关于https://goproxy.cn,direct与https://proxy.golang.org的问题,国内无法访问https://proxy.golang.org设置了GOPROXY仍不可行

修改GOPROXY 终端执行命令

代码片段
1 行
go env -w GOPROXY=https://goproxy.cn,direct

不在终端中修改,直接修改源码

代码片段
1 行
env GO111MODULE=on GOPROXY=https://goproxy.cn,direct go run xxx