1、安装go 进入:https://golang.google.cn/dl/ 下载:go1.13.darwin-amd64.pkg 安装:默认目录为/usr/local/go 环境变量:vim /etc/profile export GOROOT=/usr/local/go export GOPATH=/Users/why/Desktop/go export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN:$GOROOT/bin 2、如果用sublime的话安装GoSublime cd /Users/why/Library/Application Sup