Download go SDK
下载地址:
go.dev
Install the SDK
Check if the installation is complete
go version
The installation is complete
Environment configuration
Open the terminal and enter: vim ~/.zshrc
and press i
to enter vim to edit this file
Add the following configuration
# 自己的项目路径
export GOPATH=/Users/wuzhenyong/work_ws/project/go_ws
# go的运行目录
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN
Exit and save when done