diff options
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/strings/init.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tpl/strings/init.go b/tpl/strings/init.go index 37a489128..b236d110a 100644 --- a/tpl/strings/init.go +++ b/tpl/strings/init.go @@ -104,6 +104,14 @@ func init() { }, ) + ns.AddMethodMapping(ctx.HasSuffix, + []string{"hasSuffix"}, + [][2]string{ + {`{{ hasSuffix "Hugo" "go" }}`, `true`}, + {`{{ hasSuffix "Hugo" "du" }}`, `false`}, + }, + ) + ns.AddMethodMapping(ctx.ToLower, []string{"lower"}, [][2]string{ |