root@iZbp1hiqzlhh6w05gloffgZ:~# go install mvdan.cc/garble@latest
go: mvdan.cc/garble@latest: module mvdan.cc/garble: Get "https://proxy.golang.org/mvdan.cc/garble/@v/list": dial tcp 172.217.160.81:443: i/o timeout
解决方法
更换阿里代理
root@iZbp1hiqzlhh6w05gloffgZ:~# go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/
如果出现这个问题
go/pkg/mod/mvdan.cc/garble@v0.12.1/main.go:40:2: zip: not a valid zip file
go/pkg/mod/mvdan.cc/garble@v0.12.1/main.go:41:2: zip: not a valid zip file
go/pkg/mod/mvdan.cc/garble@v0.12.1/internal/ctrlflow/hardening.go:10:2: zip: not a valid zip file
换成这个代理go env -w GOPROXY=https://goproxy.cn,direct
root@iZbp1hiqzlhh6w05gloffgZ:~# go env
然后查看有没有设置成功