一、golang的安装
在终端输入
brew install [email protected]
牢记你的golang安装路径
我的是/opt/homebrew/Cellar/[email protected]/1.16.15
我还安装过第二个版本/opt/homebrew/Cellar/[email protected]/1.17.13
二、golang的环境配置
vim ~/.zshrc
追加上红圈中的内容
三、验证
输入go version进行验证
出现下图所示结果则表示配置成功