How can I pass the index of an array to a template? I know I can do something like this to access the first element:
{{ with index . 0 }}
but I need to do something like this:
{{ template "mytemp" index . 0 }}
which doesn't seem to work. I also tried this which didn't work:
{{ with index . 0 }}
{{ template "mytemp" . }}
{{ end }}
I can't seem to figure out how to achieve this.