vscode GO依赖包安装

shaofeng_c · · 2959 次点击 · · 开始浏览    
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

## vscode GO依赖包安装

### 安装必要插件

### 1、下载golang.org包

```

$ cd $GOPATH/src

$ mkdir golang.org

$ cd golang.org

$ mkdir x

$ cd x

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

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

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

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

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

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

建立连接

mklink /d  D:\GO_PATH\src\golang.org\x  D:\GO_PATH\src\github.com\golang

git clone https://github.com/9fans/go D:/GO_PATH/src/9fans.net/go

go get -u -v github.com/rogpeppe/godef

cd $GOPATH/src/github.com/rogpeppe/godef

go clean -r -i

go install -v

```

### 2、下载其他模块

```

++go get github.com/golang/lint@master

++go get github.com/golang/tools@master

++go get github.com/golang/arch@master

++go get github.com/golang/sys@v0.0.0-20180905080454-ebe1bf3edb33

++go get github.com/golang/crypto@v0.0.0-20180904163835-0709b304e793

++go get github.com/golang/net@master

++go get -u -v github.com/nsf/gocode

++go get -u -v github.com/lukehoban/go-outline

++go get github.com/sirupsen/logrus

++go get github.com/9fans/go@master

++go get github.com/rogpeppe/godef

++go get github.com/lukehoban/go-find-references

++go install github.com/nsf/gocode

++go install github.com/zmb3/gogetdoc

++go install github.com/lukehoban/go-outline

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

++go install github.com/tpng/gopkgs

++go install github.com/newhook/go-symbols

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

++go install github.com/rogpeppe/godef

go get github.com/peterh/liner github.com/derekparker/delve/cmd/dlv

go get sourcegraph.com/sqs/goreturns

go install sourcegraph.com/sqs/goreturns

```

mod依赖替换

```

replace (

9fans.net/go v0.0.0-20150709035532-65b8cf069318 => github.com/9fans/go v0.0.0-20150709035532-65b8cf069318

golang.org/x/arch/x86/x86asm v0.0.0-20180920145803-b19384d3c130 => github.com/golang/arch/x86/x86asm v0.0.0-20180920145803-b19384d3c130

golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 => github.com/golang/crypto v0.0.0-20181030102418-4d3f4d9ffa16

golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 => github.com/golang/sys v0.0.0-20181031143558-9b800f95dbbc

golang.org/x/tools v0.0.0-20181019005945-6adeb8aab2de => github.com/golang/tools v0.0.0-20181102223251-96e9e165b75e

)

```


有疑问加站长微信联系(非本文作者)

本文来自:简书

感谢作者:shaofeng_c

查看原文:vscode GO依赖包安装

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

2959 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传