Skip to content

Go全局配置国内源

Windows

shell
set GOPROXY=https://goproxy.cn,direct

Linux

方法1

shell
export GOPROXY=https://goproxy.cn,direct
source ~/.bashrc

方法2

shell
go env -w GOPROXY=https://goproxy.cn,direct