VSCode安装golang插件

2019/09 01 16:09

:: 第一步:执行以下BAT

mkdir e:\download\github.com\mdempsky
cd e:\download\github.com\mdempsky/
git clone https://github.com/mdempsky/gocode

mkdir e:\download\github.com\ramya-rao-a
cd e:\download\github.com\ramya-rao-a
git clone https://github.com/ramya-rao-a/go-outline

mkdir e:\download\github.com\acroca
cd e:\download\github.com\acroca
git clone https://github.com/acroca/go-symbols

mkdir e:\download\github.com\stamblerre
cd e:\download\github.com\stamblerre
git clone https://github.com/stamblerre/gocode

mkdir e:\download\github.com\ianthehat
cd e:\download\github.com\ianthehat
git clone https://github.com/ianthehat/godef

mkdir e:\download\github.com\sqs
cd e:\download\github.com\sqs
git clone https://github.com/sqs/goreturns

mkdir e:\download\golang.org\x
cd e:\download\golang.org\x
git clone https://github.com/golang/tools.git tools
git clone https://github.com/golang/lint

:: 第二步:将download中的github.com和golang.org目录拷到 %GOPATH%\src目录中

:: 第三步:在%GOPATH%中执行以下BAT

go install github.com/mdempsky/gocode
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/stamblerre/gocode
go install github.com/ianthehat/godef
go install github.com/sqs/goreturns
go install golang.org/x/lint/golint

::第四步:把bin拷到%GOPATH%bin目录中
一共13个exe文件
dlv.exe go-outline.exe go-symbols.exe gocode-gomod.exe
gocode.exe godef-gomod.exe godef.exe golint.exe gopkgs.exe gorename.exe goreturns.exe gotour.exe guru.exe