goenv aims to be as simple as possible and follow the already established successful version management model of pyenv and rbenv.
This project was cloned from pyenv and modified for Go.
- Let you change the global Go version on a per-user basis.
- Provide support for per-project Go versions.
- Allow you to override the Go version with an environment variable.
- Search commands from multiple versions of Go at a time.
- https://github.com/pwoolcoc/goenv depends on Python,
- https://github.com/crsmithdev/goenv depends on Go,
- https://github.com/moovweb/gvm is a different approach of the problem that's modeled after
nvm
.goenv
is more simplified.
You can affect 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. |
The goenv source code is hosted on GitHub. It's clean, modular, and easy to understand, even if you're not a shell hacker. (I hope)
Tests are executed using Bats:
$ make test
Please feel free to submit pull requests and file bugs on the issue tracker.