The GOPATH environment variable specifies the location of the workspace. You must have to set this environment variable while developing Go code.