配置代理
类unix配置goproxy
cat >> ~/.bash_profile <<EOF
# Enable the go modules feature
export GO111MODULE=on
# Set the GOPROXY environment variable
export GOPROXY=https://goproxy.cn
EOF
. ~/.bash_profile
windwos配置goproxy
打开powershell
执行:
# Enable the go modules feature
$env:GO111MODULE="on"
# Set the GOPROXY environment variable
$env:GOPROXY="https://goproxy.cn"