Error FILE:CLIENT_TEST.GO solution when installing go

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.