~whereswaldon/gover

gover/README.md -rw-r--r-- 1.3 KiB
79846e8dChris Waldon feat: link gofmt as well as go 4 months ago

#gover

A simple shell script for installing and switching between go versions on Linux, FreeBSD, and macOS.

Currently only supports x86_64, but contributions to improve this are welcome.

#Prerequisites

gover assumes a POSIX environment with grep, sed, curl, and coreutils.

Ensure $HOME/.local/bin is towards the beginning of your $PATH.

curl --tlsv1.2 -o ~/.local/bin/gover https://git.sr.ht/~whereswaldon/gover/blob/main/gover && \
chmod +x ~/.local/bin/gover

#System install (requires sudo)

sudo curl --tlsv1.2 -o /usr/local/bin/gover https://git.sr.ht/~whereswaldon/gover/blob/main/gover && \
sudo chmod +x /usr/local/bin/gover

You will need to invoke gover as sudo gover each time you use it.

#Usage

gover <version>

This will activate the specified version of go (installing it if needed).

You can specify latest as a version to get the latest available version.

If no version is specified, latest is assumed.

#Examples

gover # assume latest and install
gover latest # explicitly request latest
gover 1.14.6 # install and activate go 1.14.6
gover 1.13.14 # install and activate go 1.13.14
gover 1.14.6 # activate go 1.14.6 (already installed)

#License

Dual MIT/Unlicense