Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 1.6 KB

ENVIRONMENT_VARIABLES.md

File metadata and controls

17 lines (15 loc) · 1.6 KB

Environment variables

You can configure how goenv operates with the following settings:

name default description
GOENV_VERSION Specifies the Go version to be used.
Also see goenv help shell.
GOENV_ROOT ~/.goenv Defines the directory under which Go versions and shims reside.
Current value shown by goenv root.
GOENV_DEBUG Outputs debug information.
Also as: goenv --debug <subcommand>
GOENV_HOOK_PATH Colon-separated list of paths searched for goenv hooks.
GOENV_DIR $PWD Directory to start searching for .go-version files.
GOENV_DISABLE_GOROOT 0 Disables management of GOROOT.
Set this to 1 if you want to use a GOROOT that you export.
GOENV_DISABLE_GOPATH 0 Disables management of GOPATH.
Set this to 1 if you want to use a GOPATH that you export. It's recommend that you use this (as set to 0) to avoid mixing multiple versions of golang packages at GOPATH when using different versions of golang. See go-nv#72 (comment)
GOENV_GOPATH_PREFIX $HOME/go GOPATH prefix that's exported when GOENV_DISABLE_GOPATH is not 1.
E.g in practice it can be $HOME/go/1.12.0 if you currently use 1.12.0 version of go.
GOENV_APPEND_GOPATH If GOPATH is set, it will be appended to the computed GOPATH.
GOENV_PREPEND_GOPATH If GOPATH is set, it will be prepended to the computed GOPATH.
GOENV_GOMOD_VERSION_ENABLE if GOENV_GOMOD_VERSION_ENABLE is set to 1, it will try to use the project's go.mod file to get the version.