Go设置国内源
Windows
go env -w GOPROXY=https://goproxy.cn,direct
Linux/Mac.方法1:
export GOPROXY=https://goproxy.cn
Linux/Mac.方法2:
vim ~/.bashrc
在里面添加一行:
export GOPROXY=https://goproxy.cn
刷新环境变量:
source ~/.bashrc
Windows
go env -w GOPROXY=https://goproxy.cn,direct
Linux/Mac.方法1:
export GOPROXY=https://goproxy.cn
Linux/Mac.方法2:
vim ~/.bashrc
在里面添加一行:
export GOPROXY=https://goproxy.cn
刷新环境变量:
source ~/.bashrc