上QQ阅读APP看书,第一时间看更新
Technical requirements
From this chapter onward, you will need Go installed on your machine. Follow these steps to do this:
- Download the latest version of Go from https://golang.org/dl/.
- Extract it with tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz.
- Add it to PATH with export PATH=$PATH:/usr/local/go/bin.
- Ensure that Go is installed with go version.
- Add the export statement in your .profile to add it automatically.
- 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.