In this chapter, you'll see some code examples using Go. I recommend that you install Go and try to build and run the code examples yourself.
Technical requirements
Installing Go with Homebrew on macOS
On macOS, I recommend using Homebrew:
$ brew install go
Next, make sure the go command is available:
$ ls -la `which go`
lrwxr-xr-x 1 gigi.sayfan admin 26 Nov 17 09:03 /usr/local/bin/go -> ../Cellar/go/1.11.2/bin/go
To see all the options, just type go. Also, make sure that you define GOPATH in your .bashrc file and add $GOPATH/bin to your path.
Go comes with the Go CLI that provides many capabilities, but you may want to install additional tools. Check out https://awesome-go.com/.