第一步:GO语言安装
第二步:Visual Studio Code 下载
第三步:安装git。
第四步:安装mingw64编译器
第五步:设置Windows系统环境变量,
(1)设置GOPATH环境变量,我的值为D:(xxx) ,并在xxx目录下建立(src,bin,pkg,src\golang.org\x)5个文件夹(万恶的墙)
(2)设置GOPATH下bin环境变量,%GOPATH%\bin
(3)配置安装之后git安装路径下bin配置到PATH环境变量中
(4)配置安装之后git安装路径下cmd配置到PATH环境变量中
(5)配置安装之后git安装路径下\mingw32\libexec\git-core配置到PATH环境变量中
(6)配置安装之后mingw64编译器\bin到PATH环境变量中
第六步:cmd 进入%GoPath%/src/golang.org/x路径下git clone,并执行如下命令
git clone https://github.com.cnpmjs.org/golang/tools.git
git clone https://github.com.cnpmjs.org/golang/mod.git
git clone https://github.com.cnpmjs.org/golang/xerrors.git
git clone https://github.com.cnpmjs.org/golang/lint.git
git clone https://github.com.cnpmjs.org/golang/sync.git
第七步:cmd 切换到%GoPath%/bin目录下go install
go install github.com/mdempsky/gocode@latest
go install github.com/rogpeppe/godef@latest
go install github.com/lukehoban/go-find-references@latest
go install github.com/lukehoban/go-outline@latest
go install github.com/sqs/goreturns@latest
go install golang.org/x/tools/cmd/gorename@latest
go install github.com/tpng/gopkgs@latest
go install github.com/josharian/impl@latest
go install github.com/newhook/go-symbols@latest
go install golang.org/x/tools/cmd/guru@latest
go install golang.org/x/lint/golint@latest
第八步:go调试工具安装,命令行
cd %GOPATH%/src/
git clone https://github.com.cnpmjs.org/derekparker/delve.git
cd delve/cmd/dlv/
go build
go install
第九步:打开vscode ,点击扩展 安装go语言