This is a simple go version switcher.
Just run: go install github.com/das6ng/govs@latest
- First, you should specify your
GOROOT
's parent directory in a environment variableGO_ROOT_PARENT_DIR
for example, export GO_ROOT_PARENT_DIR="$HOME/.local/"
- And then, prepare a your go sdk in
GO_ROOT_PARENT_DIR
MANUALLY.
your GO_ROOT_PARENT_DIR
directory should looks like this:
GO_ROOT_PARENT_DIR
|
|-go/ --> your GOROOT should points to this dir
|-go1.18.10/ --> available go sdks
|-go1.19/
|-go1.20.3/
`