Manage environment variables used by the Go toolchain.
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]
go env [ var ... ]
Env prints Go environment information.
By default env prints information as a shell script (on Windows, a batch file). If one or more variable names is given as arguments, env prints the value of each named variable on its own line.
This manual page was written by Michael Stapelberg <firstname.lastname@example.org>, for the Debian project (and may be used by others).