tldr/pages/common/go-env.md
会有猫的 4cac843cae
go-*: apply additional suggestions
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2020-05-21 12:33:55 +01:00

414 B

go env

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

  • Show all environment variables:

go env

  • Show a specific environment variable:

go env {{GOPATH}}

  • Set an environment variable to a value:

go env -w {{GOBIN}}={{path/to/directory}}

  • Reset an environment variable's value:

go env -u {{GOBIN}}