golang: go build遇到报错

中国墙是国内程序员进步路上的最大绊脚石

编译go的过程中遇到这样的报错:
module ***: Get "https://proxy.golang.org/***": dial tcp 172.217.160.113:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
你可以试着访问一下proxy.golang.org,怎么样,访问不了吧,没错,这是被我们伟大的长城防火墙给屏蔽了,你需要改成我们国内可用的代理地址,直接在命令行执行
go env -w GOPROXY=https://goproxy.cn

THE END

你可能感兴趣的:(golang: go build遇到报错)