Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCameron Moore <moorereason@gmail.com>2017-05-17 22:26:02 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-20 00:00:20 +0300
commita59525b05b071de020ecc457c94ad0a987040d93 (patch)
treef9342a6425394ccfb63e960c96d08dea8a26fe81
parent3954160a21bcde7d4f4c077f9cc9daa610f3e29e (diff)
tpl/time: Remove asTime template func mapping
-rw-r--r--tpl/time/init.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/tpl/time/init.go b/tpl/time/init.go
index 9f9cf275f..8e21bca61 100644
--- a/tpl/time/init.go
+++ b/tpl/time/init.go
@@ -32,8 +32,7 @@ func init() {
// 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
@@ -59,13 +58,6 @@ func init() {
[][2]string{},
)
- ns.AddMethodMapping(ctx.AsTime,
- []string{"asTime"},
- [][2]string{
- {`{{ (asTime "2015-01-21").Year }}`, `2015`},
- },
- )
-
return ns
}