Hands-On System Programming with Go
上QQ阅读APP看书,第一时间看更新

Technical requirements

From this chapter onward, you will need Go installed on your machine. Follow these steps to do this:

  1. Download the latest version of Go from https://golang.org/dl/.
  2. Extract it with tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz.
  3. Add it to PATH with export PATH=$PATH:/usr/local/go/bin.
  4. Ensure that Go is installed with go version.
  1. Add the export statement in your .profile to add it automatically.
  2. You can also change the GOPATH variable (the default one is ~/go) if you want to use a different directory for your code.

I also recommend installing Visual Studio Code (https://code.visualstudio.com/) with its vscode-go (https://github.com/Microsoft/vscode-go) extension, which contains a helper that will install all the tools that are needed to improve the Go development experience.