惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

博客园 - 流星啊。

navicat15 for mysql激活 sql 循环语句几种方式 试用版SQL Server 2008 R2 提示评估期已过 常用SQL QQ web api Mysql数据库的分离和附加<转> Java字符串转换为日期和时间比较大小 Oracle中账户被锁定的解决方法 清除代码异味 EXT3.3在IE9上 , TreePanel click event 失效 在XP下配置自己的服务器IIS Extjs 树形设置选中 Window下删除SVN文件 GOF设计模式(转) ASCII表 博文阅读密码验证 - 博客园 查询最近10天要过生日的会员 Extjs中grid初始化时选中指定行的问题 - 流星啊。 - 博客园 C# 中ref out区别
vscode安装go所有插件
流星啊。 · 2021-05-28 · via 博客园 - 流星啊。

原文节选自https://blog.csdn.net/xiazhipeng1000/article/details/109584712

备用以为后用

时间很重要 

最好使用SDK版本version go1.15.的   16会报错

vscode版本:1.56.2

go版本:version go1.15.2 windows/amd64

git客户端版本:Git-2.29.2.2-64-bit

需要提前安装go、vscode、git客户端,配置git环境,配置go环境,配置环境变量GOPATH  , GOROOT , PATH 。

安装插件

需要手动从github上面将包下载下来

在src目录下面建立两个目录

– src
​ |–golang.org
---- |–x
​ |–github.com

有些包是需要放到github.com,有另外一部分是需要放到golang.org\x这个文件夹中的

下面就一个一个的下载包

gopkgs包

在src的gitbub.com文件夹下,使用cmd命令窗口输入,一定要按照这个文件目录生成,要不然没有办法安装,

git clone https://github.com/uudashr/gopkgs.git uudashr/gopkgs

这个包的安装需要另外两个辅助包:

git clone https://github.com/pkg/errors pkg/errors

git clone https://github.com/karrick/godirwalk.git karrick/godirwalk

下载完上面的两个辅助包,就可以进行安装了

使用cmd命令行窗口(在任意目录下),输入下面的命令就可以安装了:

go install github.com/uudashr/gopkgs/v2/cmd/gopkgs

安装完成之后,在src同级的bin目录下会生成gocode.exe

go-outline包

在github.com目录下面,使用下面的命令下载包:

git clone https://github.com/ramya-rao-a/go-outline.git ramya-rao-a/go-outline

安装:(在任意目录下面,下面都一样)

go install github.com/ramya-rao-a/go-outline

go-symbols包

下载:在github.com目录下面

git clone https://github.com/acroca/go-symbols.git acroca/go-symbols

安装:

go install github.com/acroca/go-symbols

安装完成之后,在bin下会生成go-symbols.exe

guru、gorename包

这两个包在tools这个大包中,我们把这个大包下载下来,这个比较大,下载比较慢

下载:在golang.org/x目录下面,没有x这个目录新建一个,这个就是字母x,不是指代

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

这个的安装也需要辅助包:

git clone https://github.com/golang/xerrors.git xerrors (在golang.org/x目录下)

git clone https://github.com/golang/mod.git mod(在golang.org/x目录下)

安装:

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

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

在bin目录下面会出现guru.exe、gorename.exe

gotests包

下载:在github.com目录下面,这个有点慢

git clone https://github.com/cweill/gotests.git cweill/gotests

安装:

go install github.com/cweill/gotests

gomodifytags包

下载:在github.com目录下面

git clone https://github.com/fatih/gomodifytags.git fatih/gomodifytags

这个也需要辅助包:在github.com目录下面

git clone https://github.com/fatih/structtag.git fatih/structtag

git clone https://github.com/fatih/camelcase.git fatih/camelcase

安装:

go install github.com/fatih/gomodifytags

在bin下会出现一个gomodifytags.exe

impl包

下载:在github.com目录下面

git clone https://github.com/josharian/impl.git josharian/impl

安装:

go install github.com/josharian/impl

在bin下会出现impl.exe

fillstruct包

下载:在github.com目录下面,这个有点慢

git clone https://github.com/davidrjenni/reftools.git davidrjenni/reftools

安装:

go install github.com/davidrjenni/reftools/cmd/fillstruct

在bin下会出现fillstruct.exe

goplay包

下载:在github.com目录下面

git clone https://github.com/haya14busa/goplay haya14busa/goplay

这个需要辅助包:在github.com目录下面

git clone https://github.com/skratchdot/open-golang.git skratchdot/open-golang

安装:

go install github.com/haya14busa/goplay/cmd/goplay

在bin目录下面会出现goplay.exe

godoctor包

下载:在github.com目录下面,这个有点慢

git clone https://github.com/godoctor/godoctor.git godoctor/godoctor

安装:

go install github.com/godoctor/godoctor

在bin目录下会出现godoctor.exe

dlv包

下载:在github.com目录下面,这个有点慢

git clone https://github.com/go-delve/delve.git go-delve/delve

安装:

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

会在bin目录下面生成dlv.exe

gocode-gomod包

下载:在github.com目录下面,这个有点慢

git clone https://github.com/stamblerre/gocode.git stamblerre/gocode

安装:

go install github.com/stamblerre/gocode

在bin目录下面会出现gocode-gomod.exe

godef包

下载:在github.com目录下面,这个有点慢

git clone https://github.com/rogpeppe/godef.git rogpeppe/godef

安装:

go install github.com/rogpeppe/godef

在bin目录下面会出现godef.exe文件

goreturns包

下载:在github.com目录下面,这个有点慢

git clone https://github.com/sqs/goreturns.git sqs/goreturns

安装:

go install github.com/sqs/goreturns

在bin目录下会生成goreturns.exe

lint包

下载:在golang.org/x目录下面

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

安装:

go install golang.org/x/lint/golint

在bin下面会出现golint.exe
————————————————
版权声明:本文为CSDN博主「爱喝水的社长」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xiazhipeng1000/article/details/109584712

一些问题

1 如果clone失败多获取几次就好了

2 报错“

golang.org/x/tools/cmd/guru
tools\go\internal\cgo\cgo.go:67:2: cannot find package "golang.org/x/sys/execabs" in any of:


执行下面命令

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

3 配置gopls插件

对于没有成功安装gopls(智能提示功能)的小伙伴,下面是具体的操作方式

进入gopath cd %GOPATH%,接着一次执行

go env -w GOPROXY=https://goproxy.io,direct
go env -w GO111MODULE=on
go get golang.org/x/tools/gopls@latest

结束记得关闭
go env -w GO111MODULE=off