go版本:1.20.6
需求:用GBK解码字符串,但是执行以下命令效果如下
命令:
go get golang.org/x/text/encoding/simplifiedchinese@latest
返回:
go: golang.org/x/text/encoding/simplifiedchinese@latest: module golang.org/x/text/encoding/simplifiedchinese: Get "https://proxy.golang.org/golang.org/x/text/encoding/simplifiedchinese/@v/list": dial tcp 142.251.42.241:443: connectex: A connection attempt fail
ed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
命令:
go get golang.org/x/text/encoding/simplifiedchinese@v0.11.0
返回:
go: golang.org/x/text/encoding/simplifiedchinese@v0.11.0: Get "https://proxy.golang.org/golang.org/x/text/encoding/simplifiedchinese/@v/v0.11.0.info": dial tcp 142.251.43.17:443: connectex: A connection attempt failed because the connected party did not proper
ly respond after a period of time, or established connection failed because connected host has failed to respond.
https://proxy.golang.org/ 和 https://pkg.go.dev/ 都连的上,但就是下载不了