5 ms·
Go the language does not require any environment variable (see https://golang.org/ref/spec https://golang.org/ref/spec). Go the tool (that wraps compilations an
by tumdum_ 10y ago
Go the language does not require any environment variable (see https://golang.org/ref/spec https://golang.org/ref/spec). Go the tool (that wraps compilations and linking) did depend on $GOPATH environment variable to find location of installed packages (see https://golang.org/cmd/go/#hdr-GOPATH_environment_variable https://golang.org/cmd/go/#hdr-GOPATH_environment_variable).
In some ways this is similar to cargo which depends on existence of ~/.cargo
btw. you can manually invoke Go compiler and linker. A very simple example from some time ago can be found here: https://github.com/tumdum/go_build https://github.com/tumdum/go_build