---
---
{{/* range */}}
{{`https://golang.org/pkg/text/template/#hdr-Actions` | markdownify }}

{{`
{{range pipeline}} T1 {{end}}
  The value of the pipeline must be an array, slice, map, or channel.
  If the value of the pipeline has length zero, nothing is output;
  otherwise, dot is set to the successive elements of the array,
  slice, or map and T1 is executed. If the value is a map and the
  keys are of basic type with a defined order ("comparable"), the
  elements will be visited in sorted key order.
`}}

{{range (seq 1 5) }} {{.}} {{end}}
{{ $myMap := dict "hello" 42 "foo" "bar" "A" "z-end" "a" "a" "Z" "Z" "11" "eleven" "2" "two" }}
{{ printf "%+v" $myMap }}
{{range ($myMap) }} {{.}} {{end}}

{{`
{{range pipeline}} T1 {{else}} T0 {{end}}
  The value of the pipeline must be an array, slice, map, or channel.
  If the value of the pipeline has length zero, dot is unaffected and
  T0 is executed; otherwise, dot is set to the successive elements
  of the array, slice, or map and T1 is executed.
`}}

{{range (slice "a" 2) }} {{.}} {{else}} empty {{end}}
{{range (slice      ) }} {{.}} {{else}} empty {{end}}


https://golang.org/pkg/text/template/#hdr-Actions


{{range pipeline}} T1 {{end}}
  The value of the pipeline must be an array, slice, map, or channel.
  If the value of the pipeline has length zero, nothing is output;
  otherwise, dot is set to the successive elements of the array,
  slice, or map and T1 is executed. If the value is a map and the
  keys are of basic type with a defined order ("comparable"), the
  elements will be visited in sorted key order.


 1  2  3  4  5 

map[2:two hello:42 foo:bar A:z-end a:a Z:Z 11:eleven]
 eleven  two  z-end  Z  a  bar  42 


{{range pipeline}} T1 {{else}} T0 {{end}}
  The value of the pipeline must be an array, slice, map, or channel.
  If the value of the pipeline has length zero, dot is unaffected and
  T0 is executed; otherwise, dot is set to the successive elements
  of the array, slice, or map and T1 is executed.


 a  2 
 empty