Visual Studio Code 安装 Go 插件脚本
创建 github.com 插件目录及下载插件
cd %GOPATH%/src mkdir github.com cd %GOPATH%/src/github.com mkdir acroca cweill derekparker go-delve josharian karrick mdempsky pkg ramya-rao-a rogpeppe sqs uudashr cd %GOPATH%/src/github.com/acroca git clone https://github.com/acroca/go-symbols.git cd %GOPATH%/src/github.com/cweill git clone https://github.com/cweill/gotests.git cd %GOPATH%/src/github.com/derekparker git clone https://github.com/derekparker/delve.git cd %GOPATH%/src/github.com/go-delve git clone https://github.com/go-delve\delve.git cd %GOPATH%/src/github.com/josharian git clone https://github.com/josharian/impl.git cd %GOPATH%/src/github.com/karrick git clone https://github.com/karrick/godirwalk.git cd %GOPATH%/src/github.com/mdempsky git clone https://github.com/mdempsky/gocode.git cd %GOPATH%/src/github.com/pkg git clone https://github.com/pkg/errors.git cd %GOPATH%/src/github.com/ramya-rao-a git clone https://github.com/ramya-rao-a/go-outline.git cd %GOPATH%/src/github.com/rogpeppe git clone https://github.com/rogpeppe/godef.git cd %GOPATH%/src/github.com/sqs git clone https://github.com/sqs/goreturns.git cd %GOPATH%/src/github.com/uudashr git clone https://github.com/uudashr/gopkgs.git
创建 golang.org 插件目录及下载插件
cd %GOPATH%/src mkdir golang.org cd %GOPATH%/src/golang.org mkdir x cd %GOPATH%/src/golang.org/x git clone https://github.com/golang/tools.git git clone https://github.com/golang/lint.git
手动安装插件
cd %GOPATH%/src go install github.com/mdempsky/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 github.com/rogpeppe/godef go install github.com/sqs/goreturns go install github.com/derekparker/delve/cmd/dlv go install github.com/cweill/gotests go install github.com/josharian/impl go install golang.org/x/tools/cmd/guru go install golang.org/x/tools/cmd/gorename go install golang.org/x/lint/golint
其实还是少了 dlv 插件,我是进了 Visual Studio Code 之后,按提示装好了
安装 Go GUI 框架 lxn/walk 时,要手动安装 golang/sys/windows 包
无法直接直接安装,只能先从 https://github.com/golang/sys 手动下载到
%GOPATH%/src/golang.org/x/sys, 然后
cd %GOPATH%/src go install golang.org/x/sys/windows