go env

Manage environment variables used by the Go toolchain. More information: https://golang.org/cmd/go/#hdr-Print_Go_environment_information.

go env

go env GOPATH

go env -w GOBIN=path/to/directory

go env -u GOBIN