菜单

admin
发布于 2024-05-23 / 120 阅读
0

golang设置代理

go env -w GOPROXY=https://goproxy.cn,direct
	• 阿里云
配置如下:
export GOPROXY=https://mirrors.aliyun.com/goproxy/
	• nexus社区提供的
配置如下:
export GOPROXY=https://gonexus.dev
	• goproxy.io 的
配置如下:
export GOPROXY=https://goproxy.io/
	• 基于athens的公共服务
配置如下:
export GOPROXY=https://athens.azurefd.net
	• 官方提供的(jfrog,golang)
export GOPROXY=https://gocenter.io
export GOPROXY=https://proxy.golang.org
	• 七牛云赞助支持的
export GOPROXY=https://goproxy.cn

echo "export GO111MODULE=on" >> ~/.profile
echo "export GOPROXY=https://goproxy.cn" >> ~/.profile
source ~/.profile