Worth mentioning you don't need the second _ variable in range
statements e.g. use:
for i := range items {
.
}
vs:
for i, _ := range items {
.
}
On 07/01/2019 02:24, bucha...@gmail.com wrote:
https://play.golang.org/p/NnACN5fLPT3
I was taking the address o
On Sun, Jan 6, 2019 at 10:38 PM wrote:
>
> 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, bu