使用代理:https://goproxy.io/zh/
仅需使用如下命令即可:
go env -w GOPROXY=https://goproxy.io,direct
# 还可以设置不走 proxy 的私有仓库或组,多个用逗号相隔(可选)
go env -w GOPRIVATE=*.corp.example.com,github.com/org_private
使用代理:https://goproxy.io/zh/
仅需使用如下命令即可:
go env -w GOPROXY=https://goproxy.io,direct
# 还可以设置不走 proxy 的私有仓库或组,多个用逗号相隔(可选)
go env -w GOPRIVATE=*.corp.example.com,github.com/org_private