reflect.IsSlice
Reports whether the given value is a slice.
- Syntax
- reflect.IsSlice INPUT
- Returns
- bool
Usage
The reflect.IsSlice function reports whether the given value is a slice. The function also returns true for a page collection, such as the value returned by the RegularPages method on a Site object.
Examples
{{ reflect.IsSlice (slice 1 2 3) }} → true
{{ reflect.IsSlice (dict "key" "value") }} → false
{{ reflect.IsSlice "yo" }} → falseChecking values returned by other functions and methods:
{{ reflect.IsSlice (split "a,b,c" ",") }} → true
{{ reflect.IsSlice site.RegularPages }} → trueLast updated:
November 22, 2026
:
content: Apply style guide to reflect functions (94d3db6cf)
Improve this page