Install Go

Download and execute package. https://go.dev/dl/

Install Go versions

go install golang.org/dl/go1.10.7@latest
~/go/bin/go1.10.7 download
~/go/bin/go1.10.7

Uninstall Go

sudo rm -rf /usr/local/go
sudo rm -rf /etc/path.d/go
rm -rf ~/go ~/sdk

Tips

Add ~/go/bin to PATH. By default, the versions will be installed into $HOME/go where your $PATH doesn’t have it normally.

.zlogin, .zshrc

PATH=$HOME/go/bin:$PATH

discussion