转载:go语言mod常用命令附国内goproxy镜像地址

转载链接:https://www.jianshu.com/p/5e8607963bb5在这里插入图片描述
GOPROXY
国内镜像加速地址:

  1. 七牛 CDN
    go env -w GOPROXY=https://goproxy.cn,direct

  2. 阿里云
    go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct

  3. 官方
    go env -w GOPROXY=https://goproxy.io,direct

Windows 下设置 GOPROXY 的命令为:
go env -w GOPROXY={{地址}}

MacOS 或 Linux 下设置 GOPROXY 的命令为:
export GOPROXY={{地址}}

Go语言在 1.13 版本之后 GOPROXY 默认值为 https://proxy.golang.org,在国内可能会存在下载慢或者无法访问的情况,所以十分建议大家将 GOPROXY 设置为国内的 goproxy.cn。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值