GoはENVプロキシGoProxyを修正して、公式サンプルコードを実行してもモジュールが取得できない問題を解決します

3 つのステップで問題を分解する

1. 問題を知る

フィールドログ

Get "https://proxy.golang.org/rsc.io/quote/@v/list": dial tcp 172 .217.163.49: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. 問題を分析する

ログから手がかりを見つけてください。その理由は、接続がタイムアウトしたか、接続の確立に失敗した可能性があります。

3. 問題を解決する

env を使用してプロキシ サーバー GoProxy を変更する

E:\go\hello>go env -w GOPROXY=https://goproxy.cn

オリジナル

おすすめ

転載: blog.csdn.net/shupili141005/article/details/127803546