#
## 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
)
```
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- MacOS 下安装 flutter 遇到的一个依赖问题
- 浅析依赖倒转、控制反转、IoC 容器、依赖注入。
- Angular 4 依赖注入教程之五 FactoryProvider配置依赖对象
- Gradle构建SpringBoot程序依赖管理之依赖版本自动控制
- Maven学习笔记七【可选的依赖项和依赖项排除】
- 模块化解耦框架RxFluxArchitecture4-依赖库与依赖注入
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。