8000 GitHub - go-nv/goenv: :blue_car: Like pyenv and rbenv, but for Go. · GitHub
[go: up one dir, main page]

Skip to content
  • go-nvPublic

    About

    🚙 Like pyenv and rbenv, but for Go.

    Topics

    Resources

    Code of conduct

    Contributing

    Stars

    2.6k stars

    Watchers

    16 watching

    Forks

    Latest commit

     

    History

    2,134 Commits

    Folders and files

    Repository files navigation

    Go Version Management: goenv

    PR Checks Status Latest Release License Go Bash Linux macOS

    📢 Version Note: goenv v3 is now the current stable version. v2 remains available as goenv@2 for legacy support. See Version Support Policy below.

    goenv aims to be as simple as possible and follow the already established successful version management model of pyenv and rbenv.

    New go versions are added automatically on a daily CRON schedule.

    This project was cloned from pyenv and modified for Go.

    asciicast

    goenv does...

    • 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.

    goenv compared to others:


    Version Support Policy

    Current Version (v3.x)

    goenv v3 is the current stable release and is recommended for all new installations. It features:

    • Complete rewrite from shell scripts to Go-based CLI for improved performance and reliability
    • Full backward compatibility with v2
    • Active development and feature updates

    Installation:

    # Homebrew (macOS/Linux)
    brew install goenv
    
    # Manual installation
    git clone https://github.com/go-nv/goenv.git ~/.goenv

    Legacy Version (v2.x)

    goenv v2 is maintained for legacy support with a minimum 2-year commitment (until December 2028 or End of Support, whichever comes first). During this period, v2 will receive:

    • Security patches and critical bug fixes
    • Maintenance through the master branch
    • Support for existing production deployments

    When to use v2:

    • AWS CodeBuild and CI systems with existing v2 dependencies
    • Production systems requiring additional validation time before migrating to v3
    • Docker containers that haven't yet been updated to v3

    Installation:

    # Homebrew - versioned formula
    brew install goenv@2 && brew link goenv@2
    
    # Manual installation - v2 branch
    git clone -b master https://github.com/go-nv/goenv.git ~/.goenv

    Migration: v3 is fully backward compatible with v2. Most users can migrate immediately without changes. See our migration guide for details.

    End of Support Date: v2 support will be discontinued on or before December 31, 2028.


    Hints

    AWS CodeBuild

    The following snippet can be inserted in your buildspec.yml (or buildspec definition) for AWS CodeBuild. It's recommended to do this during the pre_build phase.

    Side Note: if you use the below steps, please unset your golang version in the buildspec and run the installer manually.

    - (cd /root/.goenv/plugins/go-build/../.. && git pull)

    Links

    About

    🚙 Like pyenv and rbenv, but for Go.

    Topics

    Resources

    Code of conduct

    Contributing

    Stars

    2.6k stars

    Watchers

    16 watching

    Forks

    Releases

    Packages

    Used by

    Contributors

    Languages

    0