Languages

Install Go

The Go programming language, plus your first module.

  1. Install Go
    Terminal
    brew install go
  2. Start a project
    Terminal
    mkdir hello && cd hello && go mod init example.com/hello

Check it worked

  1. Check the version
    Terminal
    go version
Undo it
  1. Uninstall Go
    Terminal
    brew uninstall go
  1. Install GoNeeds sudo
    Terminal · Ubuntu / Debian
    sudo snap install go --classic

    The snap stays on the latest Go. Ubuntu's own apt version is usually older.

  2. Start a project
    Terminal · Ubuntu / Debian
    mkdir hello && cd hello && go mod init example.com/hello

Check it worked

  1. Check the version
    Terminal · Ubuntu / Debian
    go version
Undo it
  1. Uninstall GoNeeds sudo
    Terminal · Ubuntu / Debian
    sudo snap remove go
  1. Install Go
    PowerShell
    winget install GoLang.Go

    Close and reopen PowerShell afterwards.

  2. Start a project
    PowerShell
    mkdir hello; cd hello; go mod init example.com/hello

Check it worked

  1. Check the version
    PowerShell
    go version
Undo it
  1. Uninstall Go
    PowerShell
    winget uninstall GoLang.Go