I have a template which I would like to use to populate City names within a
group of <div> such that I can increment each new field before the {{end}}
I am uncertain as to how to do this and have tried the {{ index $key,
$value := . }} format, but either I am not understanding it or it isn't
doing what I would like it to.
Here is my template https://play.golang.org/p/xHS4IYfuFw
I think what I'd like to do it something like {{ for i = 0; i < len(.); i++
}}
so I can get my $value to change for each loop within my divs . As I have
it now, the values are the same for each iteration in the range, which
makes sense. Can someone please explain what I am doing wrong?
Thanks,
Dave
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.