improve go example

and fix some build error
new example:
http://play.golang.org/p/g77ofhvNyj