Hi, 

If I have Go templates Range declared like this,

{{range $i, $x := $.People}}

How can I test its index value? 

I thought it should be `{{if $i ne 0}}` but it is not working for 
me: https://play.golang.org/p/NB10G1CjBr
I've also tried `{{if $i ne "0"}}`, but that failed on me as well. 

FTA, without the testing, it works 
fine: https://play.golang.org/p/OgvVAdt24X

Thanks for helping


-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to