π Easily install and configure Golang on Linux, Mac, and Windowsβfast and hassle-free!
Choose the best method for your environment:
wget https://raw.githubusercontent.com/rafa-mori/gosetup/refs/heads/main/go.sh && bash gosetup.sh
bash <(curl -sL https://git.io/gosetup)
git clone https://github.com/rafa-mori/gosetup.git
cd gosetup && bash go.sh
Tip: You can customize the installation directories:
export GOROOT=/opt/go
export GOPATH=$HOME/projects/go
bash go.sh install
.\go.ps1 -Command install
bash go.sh install --version 1.19.4
.\go.ps1 -Command install -Version 1.19.2
bash go.sh remove
.\go.ps1 -Command remove
- name: Install Go (Exact version from go.mod) run: | export NON_INTERACTIVE=true bash -c "$(curl -sSfL 'https://raw.githubusercontent.com/rafa-mori/gosetup/main/go.sh')" -s --version "$(grep '^go ' go.mod | awk '{print $2}')"