Vscode GO安装

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/[email protected]

++go get github.com/golang/[email protected]

++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

)

你可能感兴趣的:(Vscode GO安装)