tpl/time: Add time.Duration and time.ParseDuration template funcs
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 8 Sep 2017 15:58:39 +0000 (17:58 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 9 Sep 2017 07:43:00 +0000 (09:43 +0200)
commitf4bf214137ebd24a0d12f16d3a98d9038e6eabd3
tree4bed566fbbb19478a435a7ad35682bf16d2675fd
parent0462c96a5a9da3e8adc78d96acd39575a8b46c40
tpl/time: Add time.Duration and time.ParseDuration template funcs

And with time.Duration with the convenient alias `duration`:

```
{{ mul 60 60 | duration "second" }}
```

Fixes #3828
tpl/time/init.go
tpl/time/time.go
tpl/time/time_test.go