安装 bee 工具运行的时候报错:
2021/01/24 23:29:14 INFO ? 0002 Initializing watcher... go: github.com/beego/beego/v2@v2.0.1: Get "https://proxy.golang.org/github.com/beego/beego/v2/@v/v2.0.1.mod": dial tcp 216.58.200.241: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. 2021/01/24 23:29:56 ERROR ? 0003 Failed to build the application: go: github.com/beego/beego/v2@v2.0.1: Get "https://proxy.golang.org/github.com/beego/beego/v2/@v/v2.0.1.mod": dial tcp 216.58.200.241: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,在国内无法访问
解决方法:
换一个国内能访问的代理地址:https://goproxy.cn
执行命令:
go env -w GOPROXY=https://goproxy.cn
重新执行命令,完美通过!