collections.Slice

collections.Slice


Returns a slice composed of the given values.

{{ $s := slice "a" "b" "c" }}
{{ $s }} → [a b c]

To create an empty slice:

{{ $s := slice }}