improve go example

and fix some build error
In Go, each variable is initialized to its zero value.
http://golang.org/ref/spec#The_zero_value