LinuxCommandLibrary

go-env

Manage environment variables used by the Go toolchain.

TLDR

Show all environment variables

$ go env
copy


Show a specific environment variable
$ go env [GOPATH]
copy


Set an environment variable to a value
$ go env -w [GOBIN]=[path/to/directory]
copy


Reset an environment variable's value
$ go env -u [GOBIN]
copy

SYNOPSIS

go env [ var ... ]

DESCRIPTION

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.

AUTHOR

This manual page was written by Michael Stapelberg <stapelberg@debian.org>, for the Debian project (and may be used by others).

Copied to clipboard