Is there a hasNext in a range?

Is there something like a hasNext on the range iterator? E.g. for inserting commas between members of a list (but not at the end). Pseudocode:

{{ range something }}
{{ . }}
{{     if range.hasNext }}
{{     end }}
{{ end }}

I found something on paginator but my range iterates over the result of a split and is unrelated to pages.

{{ range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}

And variations of the above (also note there is a len function).


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.