VScode 1.13 gocode提示dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the co...

在将VScode升级至 1.13后让升级gocode,在升级时报出如下错误

VScode 1.13 gocode提示dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the co..._第1张图片

D:\go_work\src>go get -u -v github.com/mdempsky/gocode
github.com/mdempsky/gocode (download)
Fetching https://golang.org/x/tools/go/gcexportdata?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1: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.
package golang.org/x/tools/go/gcexportdata: unrecognized import path "golang.org/x/tools/go/gcexportdata" (https fetch: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1: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.)

VScode 1.13 gocode提示dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the co..._第2张图片

失败原因,发现是从github/golang中下载的tools不包含gocode

解决方法:

根据提示图片信息进行查找,(github/golang下载详见:http://lc161616.cnblogs.com/p/10132518.html)。提示图片如下:

    根据vscode提示去github.com/mdempsky/gocode clone下来代码。然后放置到提示图片的路径下:为了保险我又放置在%GOPATH%\src\golang.org\x\tools下一份。

    最后手动执行go get,安装成功

VScode 1.13 gocode提示dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the co..._第3张图片

D:\go_work\src>go  get -u -v github.com/mdempsky/gocode
github.com/mdempsky/gocode (download)
Fetching https://golang.org/x/tools/go/gcexportdata?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1: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.
golang.org/x/tools (download)
Fetching https://golang.org/x/tools/go/internal/gcimporter?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/internal/gcimporter?go-get=1: dial tcp 216.239.37.1: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.
github.com/mdempsky/gocode/internal/lookdot
github.com/mdempsky/gocode/internal/cache
github.com/mdempsky/gocode/internal/suggest
github.com/mdempsky/gocode/internal/gbimporter
github.com/mdempsky/gocode

 

转载于:https://www.cnblogs.com/LC161616/p/10133036.html

你可能感兴趣的:(VScode 1.13 gocode提示dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the co...)