windows VsCode golang环境配置

安装完vscode,打开.go文件时,vscode会推荐安装go扩展插件,但是vscode中有些go的插件总是提示安装fail。如golint插件,解决办法如下:

cd $GOPATH/src/golang.org/x/
git clone https://github.com/golang/tools.git

进入到%GOPATH%下,执行

    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/rogpeppe/godef

    go install github.com/sqs/goreturns

    go install github.com/cweill/gotests/gotests
 

单独处理golint,golint的源码位于https://github.com/golang/lint,进入%GOPATH%\src\golang.org\x后执行git clone https://github.com/golang/lint下载golint需要的源码
进入到%GOPATH%下,执行go install github.com/golang/lint/golint
 

你可能感兴趣的:(Golang)