macOS go 切换版本
2023-09-14 09:09:52 时间
macOS go 切换版本
╰─➤ go version
go version go1.19 darwin/arm64
╰─➤ brew search go
╰─➤ brew install go@1.18
╰─➤ brew unlink go
╰─➤ brew link go@1.18
╰─➤ go version
go version go1.18.8 darwin/arm64
升级版本
╰─➤ go version
go version go1.18.8 darwin/arm64
╰─➤ brew install go@1.19
╰─➤ brew unlink go
Unlinking /opt/homebrew/Cellar/go/1.19.3... 0 symlinks removed.
╰─➤ brew link go@1.19
Unlinking /opt/homebrew/Cellar/go@1.18/1.18.8... 2 symlinks removed.
Linking /opt/homebrew/Cellar/go@1.19/1.19.7... 2 symlinks created.
If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/opt/homebrew/opt/go@1.19/bin:$PATH"' >> ~/.zshrc
╰─➤ go version
go version go1.19.7 darwin/arm64