1、現象
Go下載模塊提示連接失敗
dial tcp 142.251.42.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.
2、解決辦法
①查看go env中的GOSUMDB變量
go env
②關閉GOSUMDB
go env -w GOSUMDB=off
③設置代理為https://goproxy.cn,direct
go env -w GOPROXY=https://goproxy.cn,direct
④再次下載
參考連接: https://blog.csdn.net/qq_37767455/article/details/121188740