Golang Version Switch
- remove /usr/local/go if you install golang using pkg installer
sudo rm -rf /usr/local/go
sudo rm /etc/paths.d/go
- use homebrew to install golang
brew install go
- use homebrew to install golang different versions
brew install go@1.19
brew install go@1.18
- switch between golang version, for example: switch from 1.18 to 1.19
brew unlink go
brew link go@1.19