3 ms·
This is very well useful and very well done, may I suggest to keep things consistent and actually use the syntax /* */ for multi-line comments? EDIT: Also "//
by cliveowen 13y ago
This is very well useful and very well done, may I suggest to keep things consistent and actually use the syntax /* */ for multi-line comments?
EDIT: Also "// x == 1 here." should be "// x == 2 here.", those are 3 iterations.
- mseepgood 13y ago> I suggest to keep things consistent and actually use the syntax /* */ for multi-line comments Idiomatic Go code almost never uses multi-line comments, see: http://golang.org/src/pkg/net/http/request.go http://golang.org/src/pkg/net/http/request.go > Also "// x == 1 here." should be "// x == 2 here." No, it's correct. := declares a new variable. The newly declared, inner x shadows the outer x only within the block scope of the for loop: http://play.golang.org/p/cP2dWyg0qw http://play.golang.org/p/cP2dWyg0qw
- cliveowen 13y agoYeah, right, I didn't see the external variable. I might as well go ahead and delete the comment :P