Go语言GOPROXY设置

1.首先开启go module

go env -w GO111MODULE=on     // Windows  export GO111MODULE=on        // macOS 或 Linux

2.

1-七牛云配置:
go env -w GOPROXY=https://goproxy.cn      // Windows  
export GOPROXY=https://goproxy.cn         // macOS 或 Linux

2-阿里云配置:
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/       // Windows  
export GOPROXY=https://mirrors.aliyun.com/goproxy/          // macOS 或 Linux


3.设置进行查看
go env设置是否生效


参考地址: https://blog.51cto.com/u_14097531/4955395

posted on 2023-08-28 16:50  建安永乐  阅读(1769)  评论(0编辑  收藏  举报

导航