tpl: Add strings.Repeat

This commit is contained in:
David E. Wheeler
2018-06-03 02:55:37 -04:00
committed by Bjørn Erik Pedersen
parent 07b96d16e8
commit 13435a6f60
5 changed files with 109 additions and 0 deletions

View File

@@ -158,6 +158,13 @@ func init() {
},
)
ns.AddMethodMapping(ctx.Repeat,
nil,
[][2]string{
{`{{ "yo" | strings.Repeat 4 }}`, `yoyoyoyo`},
},
)
ns.AddMethodMapping(ctx.ToUpper,
[]string{"upper"},
[][2]string{