ref: be2e08c4ade95e9aab4c891f867bd8f33519a101
parent: be4a404f28f11465a20890b22f80832bdf7959f2
author: bep <[email protected]>
date: Fri May 22 18:17:45 EDT 2015
docs: add doc for seq See #1156
--- a/docs/content/templates/functions.md
+++ b/docs/content/templates/functions.md
@@ -128,6 +128,17 @@
e.g. `{{ if isset .Params "project_url" }} {{ index .Params "project_url" }}{{ end }}`
+### seq
+
+Seq creates a sequence of integers. It's named and used as GNU's seq.
+
+Some examples:
+
+* `3` => `1, 2, 3`
+* `1 2 4` => `1, 3`
+* `-3` => `-1, -2, -3`
+* `1 4` => `1, 2, 3, 4`
+* `1 -2` => `1, 0, -1, -2`
### sort
Sorts maps, arrays and slices, returning a sorted slice. A sorted array of map values will be returned, with the keys eliminated. There are two optional arguments, which are `sortByField` and `sortAsc`. If left blank, sort will sort by keys (for maps) in ascending order.