ref: a59525b05b071de020ecc457c94ad0a987040d93
parent: 3954160a21bcde7d4f4c077f9cc9daa610f3e29e
author: Cameron Moore <[email protected]>
date: Wed May 17 10:26:02 EDT 2017
tpl/time: Remove asTime template func mapping
--- a/tpl/time/init.go
+++ b/tpl/time/init.go
@@ -32,8 +32,7 @@
// If no args are passed to `time`, assume namespace usage and
// return namespace context.
//
- // If args are passed, show a deprecation warning and attempt to
- // simulate the old "as time" behavior.
+ // If args are passed, call AsTime().
if len(v) == 0 {
return ctx
@@ -57,13 +56,6 @@
ns.AddMethodMapping(ctx.Now,
[]string{"now"},
[][2]string{},
- )
-
- ns.AddMethodMapping(ctx.AsTime,
- []string{"asTime"},
- [][2]string{
- {`{{ (asTime "2015-01-21").Year }}`, `2015`},
- },
)
return ns