Skip to content

The Sequence function

Compare
Choose a tag to compare
@matang28 matang28 released this 08 Feb 06:55
· 3 commits to main since this release

When creating a template, you can now use the Sequence(num) function in order to create an integer array with length of num.

For example:

{{- range $i, $item := .Sequence 3 }}
a
{{- end }}

Will yield:

a
a
a