improve go example

and fix some build error
http://play.golang.org/p/a4Nq6lxu83