tpl: Add uniq function

This commit is contained in:
Nathan Sharfi
2017-05-29 12:03:38 -07:00
committed by Bjørn Erik Pedersen
parent 46b4607828
commit e28d9aa42c
4 changed files with 89 additions and 0 deletions

View File

@@ -137,6 +137,12 @@ func init() {
{`{{ seq 3 }}`, `[1 2 3]`},
},
)
ns.AddMethodMapping(ctx.Uniq,
[]string{"uniq"},
[][2]string{
{`{{ slice 1 2 3 2 | uniq }}`, `[1 2 3]`},
},
)
return ns