- Install Go
brew install go - Start a project
mkdir hello && cd hello && go mod init example.com/hello
Check it worked
- Check the version
go version
Undo it
- Uninstall Go
brew uninstall go
- Install GoNeeds sudo
sudo snap install go --classicThe snap stays on the latest Go. Ubuntu's own apt version is usually older.
- Start a project
mkdir hello && cd hello && go mod init example.com/hello
Check it worked
- Check the version
go version
Undo it
- Uninstall GoNeeds sudo
sudo snap remove go
- Install Go
winget install GoLang.GoClose and reopen PowerShell afterwards.
- Start a project
mkdir hello; cd hello; go mod init example.com/hello
Check it worked
- Check the version
go version
Undo it
- Uninstall Go
winget uninstall GoLang.Go