1 下载并安装vscode(略)
2 从https://golang.org/dl/https://golang.org/dl/
下载windows版本的go安装程序
3 双击安装程序,一路点next完成安装
4 安装完成后,你将看到系统变量中PATH增加一条C:\Program Files\Go\bin(下图蓝色框)。用户变量增加GOPATH(下图红色框)。
5 按照https://www.youtube.com/watch?v=1MXIGYrMk80https://www.youtube.com/watch?v=1MXIGYrMk80
的介绍,启动vscode,并按照下图所示搜索go插件,点击安装(install)
6 继续按照https://www.youtube.com/watch?v=1MXIGYrMk80的描述,安装其他插件。假如你在国内操作,你会发现插件安装失败。你懂的。。。。解决办法参考
在windows的命令行输入
go env -w GOPROXY=https://goproxy.cn
7 然后在命令行继续逐条输入如下指令:
go install golang.org/x/tools/gopls@latest
go install github.com/nsf/gocode@latest
go install golang.org/x/lint/golint@latest
go install github.com/lukehoban/go-find-references@latest
go install github.com/lukehoban/go-outline@latest
go install sourcegraph.com/sqs/goreturns@latest
go install golang.org/x/tools/cmd/gorename@latest
go install github.com/tpng/gopkgs@latest
go install github.com/newhook/go-symbols@latest
你将在GOPATH指向的路径下看到pkg/mod路径。其中保存了相应的模块。
接下来你可以进行开发了