collections.Slice
Returns a slice created from 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:
February 14, 2026
:
Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)
Improve this page