在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
解决办法这里的是Windows的环境下的解决办法 在GOPATH的src目录下面创建github.com\golang文件夹,若文件夹存请忽略本步骤 在vs code终端执行: cd %GOPATH%\src\github.com\golang 这里的%GOPATH%就是GOPATH 完成目录切换后,开始下载插件包:git clone https://github.com/golang/tools.git tools 当下载完成后,你会发现%GOPATH%\src\github.com\golang多了一个tools目录 需要把tools目录下的所有文件拷贝到%GOPATH%\src\golang.org\x\tools下,如果没有x\tools自行创建 go install github.com/nsf/gocode go install github.com/uudashr/gopkgs/cmd/gopkgs go install github.com/ramya-rao-a/go-outline go install github.com/acroca/go-symbols go install golang.org/x/tools/cmd/guru go install golang.org/x/tools/cmd/gorename go install github.com/fatih/gomodifytags go install github.com/haya14busa/goplay/cmd/goplay go install github.com/josharian/impl go install github.com/rogpeppe/godef go install sourcegraph.com/sqs/goreturns go install github.com/golang/lint/golint go install github.com/cweill/gotests/... go install github.com/derekparker/delve/cmd/dlv 在这里基本已经可以结束了,但是由于有些包在vscode自动安装的时候并没有下载成功,会出现以下错误: 解决办法:切换到%GOPATH%/src/github.com目录下执行
手动安装 go get -u -v github.com/ramya-rao-a/go-outline go get -u -v github.com/acroca/go-symbols go get -u -v github.com/mdempsky/gocode go get -u -v github.com/rogpeppe/godef go get -u -v golang.org/x/tools/cmd/godoc go get -u -v github.com/zmb3/gogetdoc go get -u -v github.com/golang/lint/golint go get -u -v github.com/fatih/gomodifytags go get -u -v golang.org/x/tools/cmd/gorename go get -u -v sourcegraph.com/sqs/goreturns go get -u -v golang.org/x/tools/cmd/goimports go get -u -v github.com/cweill/gotests/... go get -u -v golang.org/x/tools/cmd/guru go get -u -v github.com/josharian/impl go get -u -v github.com/haya14busa/goplay/cmd/goplay go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs go get -u -v github.com/davidrjenni/reftools/cmd/fillstruct go get -u -v github.com/alecthomas/gometalinter gometalinter --install
cd %GOPATH%/src/github.com git clone https://
|
请发表评论