January 2018
Intermediate to advanced
340 pages
8h 6m
English
In order for most of the Go toolchain to work, the GOPATH environment variable must be set. The GOPATH specifies what directory you treat as your workspace. The GOPATH environment variable must be set before you can build packages. For more help and information, call the go help command in the Terminal by running this command:
go help gopath
We need to tell Go to treat our home directory as the workspace. This is done by setting the GOPATH environment variable. You can set GOPATH in three ways:
GOPATH=$HOME go build hello
Read now
Unlock full access