diff options
Diffstat (limited to 'docs/content/en/functions/collections/Slice.md')
-rw-r--r-- | docs/content/en/functions/collections/Slice.md | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/content/en/functions/collections/Slice.md b/docs/content/en/functions/collections/Slice.md index 56c068d4b..385f9b658 100644 --- a/docs/content/en/functions/collections/Slice.md +++ b/docs/content/en/functions/collections/Slice.md @@ -1,6 +1,6 @@ --- title: collections.Slice -description: Creates a slice of all passed arguments. +description: Returns a slice composed of the given values. categories: [] keywords: [] action: @@ -8,7 +8,7 @@ action: related: - functions/collections/Dictionary returnType: any - signatures: [collections.Slice ITEM...] + signatures: ['collections.Slice [VALUE...]'] aliases: [/functions/slice] --- @@ -16,3 +16,9 @@ aliases: [/functions/slice] {{ $s := slice "a" "b" "c" }} {{ $s }} → [a b c] ``` + +To create an empty slice: + +```go-html-template +{{ $s := slice }} +``` |