Install the Go tools
$ brew update
$ brew install go
Create gocode folder
$ mkdir $HOME/gocode
Add to $HOME/.bash_profile the following:
export GOPATH=$HOME/gocode
export PATH=$PATH:$GOPATH/bin
Get code from github.com
$ go get -u github.com/vitor-caetano/example