Go modifies the ENV proxy GoProxy to solve the problem that the module cannot be obtained by running the official sample code

Problem deconstruction in three steps

1. Know the problem

field log

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. Analyze the problem

Find clues through the logs , the reason may be that the connection timed out or failed to establish a connection.

3. Solve problems

Modify the proxy server GoProxy through env

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

original

Guess you like

Origin blog.csdn.net/shupili141005/article/details/127803546