FAQ
I'm executing a template with 2 parallel arrays (same size) and I want to
list items from both arrays in parallel, how do I use index inside of range?

this obviously doesn't work:

{{range $i, $e := .First}}$e - {{index .Second $i}}{{end}}

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 22, '13 at 7:28a
activeApr 22, '13 at 9:03a
posts2
users2
websitegolang.org

2 users in discussion

Jesse McNelis: 1 post Gbenhaim: 1 post

People

Translate

site design / logo © 2022 Grokbase