collections.Slice
Returns a slice composed of the given values.
Syntax
collections.Slice [VALUE...]
Returns
any
Alias
slice
{{ $s := slice "a" "b" "c" }}
{{ $s }} → [a b c]
To create an empty slice:
{{ $s := slice }}
Last updated:
March 5, 2025
:
content: Remove "related" array from function and method pages (2fcd21ee5)
Improve this page