improve go example

and fix some build error
Looks they are declared but not initialized.