2 ms·
Interesting example. I'm still a newbie to Go, so would that be written as: var i int* var j int My apologies if this seems like a simple question: I have
by paupino_masano 14y ago
Interesting example. I'm still a newbie to Go, so would that be written as:
var i int*
var j int
My apologies if this seems like a simple question: I haven't played with the language enough to know :)
[EDIT: Sorry, I didn't realize how to format code!]
- Jabbles 14y agoThe asterisk goes before the type for pointers: var i *int Unlike C, values are always initialized in Go. http://play.golang.org/p/8tAzKyES2I http://play.golang.org/p/8tAzKyES2I