SIGN IN SIGN UP

cmd: Copy the loop variable into a new variable

Earlier we were appending the address of the iterator variable
to the slice. This results in unintended behavior of appending
the same address to the slice. We fix this by copying the
loop variable into a new variable and then appending.

Ref: https://github.com/golang/go/wiki/CommonMistakes#using-reference-to-loop-iterator-variable

Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
A
Ashutosh Narkar committed
00152cbd9dfe2fa6d96eff48b898d02c859d5616
Parent: 79700ce