vscode go环境配置

栏目: Go · 发布时间: 5年前

内容简介:1.先安装Visual Studio Code,下图是版本信息;2.安装Go语言支持的扩展;3.下载安装x64版本的go

1.先安装Visual Studio Code,下图是版本信息;

vscode go环境配置

2.安装 Go 语言支持的扩展;

vscode go环境配置

3.下载安装x64版本的go

https://www.golangtc.com/download,并配置环境变量GOPATH的值为工作空间的路径,我配置的如下:

vscode go环境配置

4.安装相应的扩展插件,主要在这一步遇到了困难,使用vscode的提示安装总是失败,晚上避开封锁的办法只能部分有效,后来我的解决版本是,手动将github中的插件工程通过git clone到

C:\Users\Administrator\Desktop\Go\src\github.com目录下,例如:

git clone https://github.com/derekparker/delve.git

go install github.com/derekparker/delve/cmd/dlv

相应的目录不完整需要自己去建,最终安装的插件如下:

go install github.com/nsf/gocode

go install github.com/sqs/goreturns

go install github.com/golang/lint/golint

go install github.com/newhook/go-symbols

go install golang.org/x/tools/cmd/guru

go install golang.org/x/tools/cmd/gorename

go install  github.com/rogpeppe/godef

go install github.com/lukehoban/go-outline

go install github.com/derekparker/delve/cmd/dlv

加黑体的两个是按照https://www.cnblogs.com/mubing/p/5820038.html中的避免封锁的方法安装的,最终效果如下:

vscode go环境配置

5.在vscode中运行test.go,效果如下:

vscode go环境配置

以上所述就是小编给大家介绍的《vscode go环境配置》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Probability and Computing: Randomization and Probabilistic Techn

Probability and Computing: Randomization and Probabilistic Techn

Michael Mitzenmacher、Eli Upfal / Cambridge University Press / 2017-7-3 / USD 62.23

Greatly expanded, this new edition requires only an elementary background in discrete mathematics and offers a comprehensive introduction to the role of randomization and probabilistic techniques in m......一起来看看 《Probability and Computing: Randomization and Probabilistic Techn》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换