🐹 GoSetup ⚑ - Smart Go Installer

πŸš€ Easily install and configure Golang on Linux, Mac, and Windowsβ€”fast and hassle-free!

Contributions Welcome CI Status

πŸš€ Quick Installation

Choose the best method for your environment:

🏎️ Instant Method (wget/curl)

wget https://raw.githubusercontent.com/rafa-mori/gosetup/refs/heads/main/go.sh && bash gosetup.sh bash <(curl -sL https://git.io/gosetup)

πŸ› οΈ Cloning and Running Manually

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

🎯 Features

πŸ› οΈ Essential Commands

πŸ”Ή Install or update Go

bash go.sh install .\go.ps1 -Command install

πŸ”Ή Specify a version

bash go.sh install --version 1.19.4 .\go.ps1 -Command install -Version 1.19.2

πŸ”Ή Uninstall Go

bash go.sh remove .\go.ps1 -Command remove

πŸ› οΈ Using in CI/CD with GitHub Actions

- 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}')"