Add template function slice

This commit is contained in:
digitalcraftsman authored and Bjørn Erik Pedersen committed 2016-02-27 17:04:45 +01:00
1 parent 957b735fec
commit 034fd4adc1
1 file changed
+12
+12
View File
@@ -75,6 +75,18 @@ or Create a map on the fly to pass into
### slice
`slice` allows you to create an array (`[]interface{}`) of all arguments that you pass to this function.
One use case is the concatenation of elements in combination with `delimit`:
```html
{{ delimit (slice "foo" "bar" "buzz") ", " }}
<!-- returns the string "foo, bar, buzz" -->
```
### echoParam
Prints a parameter if it is set.