summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/collections/Shuffle.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/functions/collections/Shuffle.md')
-rw-r--r--docs/content/en/functions/collections/Shuffle.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/content/en/functions/collections/Shuffle.md b/docs/content/en/functions/collections/Shuffle.md
new file mode 100644
index 000000000..8388d5332
--- /dev/null
+++ b/docs/content/en/functions/collections/Shuffle.md
@@ -0,0 +1,28 @@
+---
+title: collections.Shuffle
+linkTitle: shuffle
+description: Returns a random permutation of a given array or slice.
+keywords: [ordering]
+categories: [functions]
+keywords: []
+menu:
+ docs:
+ parent: functions
+function:
+ aliases: [shuffle]
+ returnType: any
+ signatures: [collections.Shuffle COLLECTION]
+relatedFunctions:
+ - collections.Reverse
+ - collections.Shuffle
+ - collections.Sort
+ - collections.Uniq
+aliases: [/functions/shuffle]
+---
+
+```go-html-template
+{{ shuffle (seq 1 2 3) }} → [3 1 2]
+{{ shuffle (slice "a" "b" "c") }} → [b a c]
+```
+
+The result will vary from one build to the next.