- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章成功安装vscode中go的相关插件(详细教程)由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.
让你成功安装vscode中go的相关插件 。
注意:该演示环境是windows环境,linux和mac环境操作思路一样 。
vscode中有很多go的相关插件,非常好用如下:
gocode gopkgs go-outline go-symbols guru gorename gomodifytags goplay impl godef goreturns golint gotests dlv 。
但是由于各种原因,这些插件无法安装,甚至你FQ之后发现也还是无法安装,加上最近FQ被限制的这么严格,所以总结了如下方法,让你在不FQ的情况下还能将这些插件安装成功,下图是我直接通过vscode安装提示的错误:
貌似运气还不错,还安装成功了几个,但是大部分还是没有安装成功,下面是详细的安装日志:
1
|
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
Installing 14 tools at D:\go_project\bin
gocode
gopkgs
go-outline
go-symbols
guru
gorename
gomodifytags
goplay
impl
godef
goreturns
golint
gotests
dlv
Installing github.com/nsf/gocode SUCCEEDED
Installing github.com/uudashr/gopkgs/cmd/gopkgs SUCCEEDED
Installing github.com/ramya-rao-a/go-outline FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/fatih/gomodifytags SUCCEEDED
Installing github.com/haya14busa/goplay/cmd/goplay SUCCEEDED
Installing github.com/josharian/impl FAILED
Installing github.com/rogpeppe/godef SUCCEEDED
Installing sourcegraph.com/sqs/goreturns FAILED
Installing github.com/golang/lint/golint FAILED
Installing github.com/cweill/gotests/... FAILED
Installing github.com/derekparker/delve/cmd/dlv SUCCEEDED
8 tools failed to install.
go-outline:
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/ramya-rao-a/go-outline
github.com/ramya-rao-a/go-outline (download)
Fetching
https://golang.org/x/tools/go/buildutil?go-get=1
https fetch failed: Get
https://golang.org/x/tools/go/buildutil?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/buildutil: unrecognized import path "golang.org/x/tools/go/buildutil" (https fetch: Get
https://golang.org/x/tools/go/buildutil?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/ramya-rao-a/go-outline (download)
Fetching
https://golang.org/x/tools/go/buildutil?go-get=1
https fetch failed: Get
https://golang.org/x/tools/go/buildutil?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/buildutil: unrecognized import path "golang.org/x/tools/go/buildutil" (https fetch: Get
https://golang.org/x/tools/go/buildutil?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.)
go-symbols:
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/acroca/go-symbols
github.com/acroca/go-symbols (download)
Fetching
https://golang.org/x/tools/go/buildutil?go-get=1
https fetch failed: Get
https://golang.org/x/tools/go/buildutil?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/buildutil: unrecognized import path "golang.org/x/tools/go/buildutil" (https fetch: Get
https://golang.org/x/tools/go/buildutil?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/acroca/go-symbols (download)
Fetching
https://golang.org/x/tools/go/buildutil?go-get=1
https fetch failed: Get
https://golang.org/x/tools/go/buildutil?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/buildutil: unrecognized import path "golang.org/x/tools/go/buildutil" (https fetch: Get
https://golang.org/x/tools/go/buildutil?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.)
guru:
Error: Command failed: D:\Go\bin\go.exe get -u -v golang.org/x/tools/cmd/guru
Fetching
https://golang.org/x/tools/cmd/guru?go-get=1
https fetch failed: Get
https://golang.org/x/tools/cmd/guru?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/cmd/guru: unrecognized import path "golang.org/x/tools/cmd/guru" (https fetch: Get
https://golang.org/x/tools/cmd/guru?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.)
Fetching
https://golang.org/x/tools/cmd/guru?go-get=1
https fetch failed: Get
https://golang.org/x/tools/cmd/guru?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/cmd/guru: unrecognized import path "golang.org/x/tools/cmd/guru" (https fetch: Get
https://golang.org/x/tools/cmd/guru?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.)
gorename:
Error: Command failed: D:\Go\bin\go.exe get -u -v golang.org/x/tools/cmd/gorename
Fetching
https://golang.org/x/tools/cmd/gorename?go-get=1
https fetch failed: Get
https://golang.org/x/tools/cmd/gorename?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/cmd/gorename: unrecognized import path "golang.org/x/tools/cmd/gorename" (https fetch: Get
https://golang.org/x/tools/cmd/gorename?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.)
Fetching
https://golang.org/x/tools/cmd/gorename?go-get=1
https fetch failed: Get
https://golang.org/x/tools/cmd/gorename?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/cmd/gorename: unrecognized import path "golang.org/x/tools/cmd/gorename" (https fetch: Get
https://golang.org/x/tools/cmd/gorename?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.)
impl:
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/josharian/impl
github.com/josharian/impl (download)
Fetching
https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get
https://golang.org/x/tools/imports?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/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get
https://golang.org/x/tools/imports?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/josharian/impl (download)
Fetching
https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get
https://golang.org/x/tools/imports?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/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get
https://golang.org/x/tools/imports?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.)
goreturns:
Error: Command failed: D:\Go\bin\go.exe get -u -v sourcegraph.com/sqs/goreturns
Fetching
https://sourcegraph.com/sqs/goreturns?go-get=1
Parsing meta tags from
https://sourcegraph.com/sqs/goreturns?go-get=1
(status code 200)
get "sourcegraph.com/sqs/goreturns": found meta tag get.metaImport{Prefix:"sourcegraph.com/sqs/goreturns", VCS:"git", RepoRoot:"
https://github.com/sqs/goreturns"} at https://sourcegraph.com/sqs/goreturns?go-get=1
sourcegraph.com/sqs/goreturns (download)
github.com/sqs/goreturns (download)
Fetching
https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get
https://golang.org/x/tools/imports?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/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get
https://golang.org/x/tools/imports?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.)
Fetching
https://sourcegraph.com/sqs/goreturns?go-get=1
Parsing meta tags from
https://sourcegraph.com/sqs/goreturns?go-get=1
(status code 200)
get "sourcegraph.com/sqs/goreturns": found meta tag get.metaImport{Prefix:"sourcegraph.com/sqs/goreturns", VCS:"git", RepoRoot:"
https://github.com/sqs/goreturns"} at https://sourcegraph.com/sqs/goreturns?go-get=1
sourcegraph.com/sqs/goreturns (download)
github.com/sqs/goreturns (download)
Fetching
https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get
https://golang.org/x/tools/imports?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/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get
https://golang.org/x/tools/imports?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.)
golint:
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/golang/lint/golint
github.com/golang/lint (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.)
github.com/golang/lint (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.)
gotests:
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/cweill/gotests/...
github.com/cweill/gotests (download)
Fetching
https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get
https://golang.org/x/tools/imports?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 github.com/cweill/gotests
imports golang.org/x/tools/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get
https://golang.org/x/tools/imports?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/cweill/gotests (download)
Fetching
https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get
https://golang.org/x/tools/imports?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 github.com/cweill/gotests
imports golang.org/x/tools/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get
https://golang.org/x/tools/imports?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.)
|
其实去src目录下看的话,是下载成功了,但是没有安装成功,并且我们也可以看出有几个是可以直接安装成功的 。
github.com/nsf/gocode github.com/tpng/gopkgs github.com/fatih/gomodifytags github.com/haya14busa/goplay github.com/rogpeppe/gode github.com/derekparker/delve/cmd/dlv 。
解决方法 。
关于go开发目录的结构这里不做过多解释,之前已经说过了 。
进行如下命令进行目录切换:
cd %GOPATH%\src\github.com\golang 。
我这里的GOPATH是在D:\go_project 如果src目录下面没有github.com\golang请自行创建 。
完成目录切换后,开始下载插件包:
git clonehttps://github.com/golang/tools.gittools 。
当下载完成后,你会发现%GOPATH%\src\github.com\golang多了一个tools目录 需要把tools目录下的所有文件拷贝到%GOPATH%\src\golang.org\x\tools下,如果没有自行创建 当然如果你是windows环境,如果你当前是在%GOPATH%\src\golang.org\x\tools 目录下,你可以直接使用如下命令进行拷贝: xcopy /s /e %GOPATH%\src\github.com\golang\tools 关于这个命令的使用可以具体百度查看,如果对该命令不熟悉就手动拷贝,直接将你下载的tools目录下的所有文件拷贝到%GOPATH%\src\golang.org\x\tools目录下 。
经过多次测试,插件中有几个其实不用翻墙或其他方法就可以安装成功:
github.com/nsf/gocode github.com/uudashr/gopkgs/cmd/gopkgs github.com/fatih/gomodifytags github.com/haya14busa/goplay/cmd/goplay github.com/derekparker/delve/cmd/dlv 。
下面安装无法安装的插件 开始安装: 切换到GOPATH目录下,执行相关的go install 命令 。
go install github.com/ramya-rao-a/go-outline 。
go install github.com/acroca/go-symbols 。
go install golang.org/x/tools/cmd/guru 。
go install golang.org/x/tools/cmd/gorename 。
go install github.com/josharian/impl 。
go install github.com/rogpeppe/godef 。
go install github.com/sqs/goreturns 。
go install github.com/golang/lint/golint 。
go install github.com/cweill/gotests/gotests 。
这样vscode下go开发需要安装的插件都已经安装成功 。
总结 。
到此这篇关于成功安装vscode中go的相关插件的详细教程的文章就介绍到这了,更多相关vscode安装go插件内容请搜索我以前的文章或继续浏览下面的相关文章希望大家以后多多支持我! 。
原文链接:https://www.cnblogs.com/Leo_wl/p/8242628.html 。
最后此篇关于成功安装vscode中go的相关插件(详细教程)的文章就讲到这里了,如果你想了解更多关于成功安装vscode中go的相关插件(详细教程)的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
第一段代码工作正常,并给出了我需要的结果。我现在想做的是让它在 'as num' 上返回 3 个数字值对于“as num”上的 3 个不同值,对于同一列上的 3 个不同位置 SELEC
我想分析一些数据以编写定价算法。以下日期可用: 我需要三个变量/维度的函数/相关因子,它显示三个维度(pers_capacity、卧室数量、浴室数量)增长时中位数(价格)的变化。例如Y(#pers_c
正如标题所说 - 我的 Sprite Kit 游戏时不时地在后台崩溃,总是出现此错误 - Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Sub
假设我尝试保存以下数据,并且Songs模型的name属性上设置了Phalcon \ Mvc \ Model \ Validator \ PresenceOf验证器 // Get an existing
我有一个 if 控件,如下所示; if (Directory.Exists(System.IO.Path.Combine(systemPath, "Reports", companyName))
有人可以告诉我我们使用 ReadLine() 从文件 (.txt) 中读取特定行吗?现在我想读取文件的全部内容(不仅仅是第一行)。为此我需要使用什么方法。我用谷歌搜索了很多,但找不到解决方案。 我的代
我相信在大学时我用从 C 派生的语言为 FPGA 编写了一个程序。我了解 VHDL 和 verilog 等语言。但是,我不明白的是程序员在使用哪个方面有多少选择?它依赖于FPGA吗?我将使用 Xili
我有一个 if 控件,如下所示; if (Directory.Exists(System.IO.Path.Combine(systemPath, "Reports", companyName))
如何在运行时更改 Dashcode (Javascript) 中图像对象的源? 我试过: var image = document.getElementById("image").object;ima
我有几个相互关联的类,它们将被多种不同的算法使用 例子: struct B; struct A { B* parent; }; struct B { std::vector child
我正在开发一个网站,用户在客户收到的表中输入金额,如果任何客户没有提供分期付款(金额),则用户不会在表中输入任何金额,并且用户希望获取违约者的信息客户以10天为基础。所以我的问题是应该定义什么表和属性
我试图从上一个条目中选择一个值,并每次将该数字加一。我让它工作到选择当前条目值(默认 1000)并递增 1 并重新插入该值(因此每次最终都是 1001)。我需要它来选择该字段的最后一个条目,这样它将变
我不擅长“制作”查询。假设这是我的数据库: artist pics ------------------- -
最近,我要为我的网站做一个即时通知系统。我听说 COMET 在这种情况下必不可少。 我已经搜索 PHP 和 Comet 一段时间了,但是,我发现的指南和文章似乎只是循环中的 ajax 请求。例如,有一
我正在开发一款 iOS 游戏,我希望 clown 在场景外生成,然后向下移动。我的想法是全部创建它们,并将它们以 360 像素的距离放置在不可见的场景中。 像这样: SKSpriteNode *clo
我有以下子订单表。 mysql> select * from suborder; +-------------+------------------+ | order_state | bookin
这可能是一个有点初学者的问题,但考虑到在 Java 中调试编码是相当相关的:什么时候编码与 String 对象相关? 假设我有一个要保存到文件中的字符串对象。 String 对象本身是否使用某种我应该
首先我想说我是 CPP 的新手(我从 cpp11 开始):)考虑以下实体:学生(名字+姓氏)和组(描述+更多学生)。我在 C++ 中创建了以下 2 个类: class Student { privat
我正在尝试在单击该复选框时同步更新我的数据库。我决定使用 aJax,但它似乎无法识别 ajax。 代码:将成为 Switch_Active(this.id) 函数的元素 ... Deactivat
我正在创建一个菜单。菜单如下。 $('.category').mouseover(function() { $(this).removeClass('category').addClass('cate
我是一名优秀的程序员,十分优秀!