summaryrefslogtreecommitdiffstats
path: root/tpl/collections/init.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-05 18:50:11 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-06 08:48:58 +0100
commit42d8dfc8c88af03ea926a59bc2332acc70cca5f6 (patch)
tree25fb78b61963f8cd801c7003420790ebb1d5b6c9 /tpl/collections/init.go
parent47506d164467eb7ddbcada81b767d8df5f9c8786 (diff)
tpl/collections: Add collections.Complement
Fixes #5400
Diffstat (limited to 'tpl/collections/init.go')
-rw-r--r--tpl/collections/init.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/tpl/collections/init.go b/tpl/collections/init.go
index 879e4738c..569932c08 100644
--- a/tpl/collections/init.go
+++ b/tpl/collections/init.go
@@ -39,6 +39,13 @@ func init() {
[][2]string{},
)
+ ns.AddMethodMapping(ctx.Complement,
+ []string{"complement"},
+ [][2]string{
+ {`{{ slice "a" "b" "c" "d" "e" "f" | complement (slice "b" "c") (slice "d" "e") }}`, `[a f]`},
+ },
+ )
+
ns.AddMethodMapping(ctx.Delimit,
[]string{"delimit"},
[][2]string{