Linux shell
# download
wget https://go.dev/dl/go1.22.4.linux-amd64.tar.gz
# install
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz
# set env; .bashrc or .zshrc
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
source ~/.bashrc
# update proxy
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
# echo version
go version
go 下载地址 https://go.dev/dl/
go 官方安装文档 https://go.dev/doc/install
修改代理文档 https://goproxy.cn/