在安装完go之后

go env

报错:zsh: command not found: go

解决方法,在~/.bash_profile 文件末尾追加一行,

alias go='/usr/local/Cellar/go@1.9/1.9.7/bin/go'

然后执行文件:source ~/.bash_profile
再尝试 go env 解决