This is a creation in Article, where the information may have evolved or changed.
gopack GRC _TEST/HTTP.A _gotest_.6
---fail:http. TestClient
Get Http://www.google.com/robots.txt:read tcp:192.168.1.2:49664->64.233.189.103:80:connection Reset by Peer
FAIL
Make[1]: * * [Test] Error 1
Make: * * * [http.test] Error 2
I personally think that the problem may be related to the Chinese network environment, because go after compiling each package to do a test, and the choice of servers are the United States server. The solution to this problem is solved, and the test conditions can be changed to domestic.
The file location is in $goroot/src/pkg/http. That's the kind of problem that this package could have.
File: client_test.go
Line:19
将http://www.google.com/robots.txt 换成http://www.google.cn/robots.txt 或者其他的你自己喜欢的地址, 当然要注意的是下面有一行测试条件,是查看返回的内容是否以"User-agent:" 开头的, 如果你换成其他地址,请确认你所替换的地址返回的内容和测试条件想匹配.
File:request_test.go
Line:106,107
将两个地址替换掉, 可以选择http://www.google.cn和http://www.baidu.com, 这个就随你喜欢了.
So there is no error when installing the compilation.