https://play.golang.org/p/NnACN5fLPT3

I was taking the address of the for-loop variable ("&v" in the example 
above) and was surprised to find that all my items pointed the same 
address. I thought I had found most of the Golang gotchas by now, but this 
is a new one to me.

-A

-- 
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