package golang.org/x/net/html: unrecognized import path "golang.org/x/net/html" 错误解决

go get的时候遇到“package golang.org/x/net/html: unrecognized import path "golang.org/x/net/html" (https fetch: Get https://golang.org/x/net/html?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed be
cause the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)”

我们可以从github上拿到这部分包并放入项目中。

1、首先在src目录下创建“golang.org\x\net”的目录结构

2、进入net目录

a.使用命令为:

git clone https://github.com/golang/net ./ 

克隆到当前目录

b.下载到本地,然后解压,将net下的所有文件及文件夹放到net目录下即可。

 

注:net目录下没有下一层的net目录。


 

你可能感兴趣的:(GoLang)