go mod 是包依赖管理工具(类比Meaven)
由于一些go的一些依赖包需要走代理才能下载
在windows终端设置:
# Set the GOPROXY environment variable
$env:GOPROXY = "https://goproxy.io,direct"
# Set environment variable allow bypassing the proxy for specified repos (optional)
$env:GOPRIVATE = "git.mycompany.com,github.com/my/private"
在GoLang设置 :
GOPROXY=https://mirrors.aliyun.com/goproxy/