mac 下配置 VS Code 开发 Golang
对于Visual Studio Code开发工具,有一款优秀的GoLang插件,它的主页为:https://github.com/microsoft/vscode-go这款插件的特性包括:
[*]代码着彩色
[*]代码自动完成(使用gocode)
[*]代码片段
[*]快速提示信息(使用godef)
[*]跳转到定义(使用godef)
[*]搜索参考引用(使用go-find-references)
[*]文件大纲(使用go-outline)
[*]重命名(使用gorename)
[*]保存构建(使用go build和go test)
[*]代码格式化(使用goreturns或goimports或gofmt)
[*]调试代码(使用delve)
安装 Go
略过
安装 Visual Studio Code
去官方网站:https://code.visualstudio.com/
下载Visual Studio Code 最新版本, 安装过程只需要简单地解压缩后 copy 到应用程序目录即可。
安装 Go 的插件
安装 依赖的几个 go 包
go get -u -v github.com/nsf/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/lukehoban/go-outline
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/newhook/go-symbols
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/lukehoban/go-find-references
参数设置
如果 设置了环境变量,这一步可以跳过。
参考资料:在Visual Studio Code配置GoLang开发环境
http://blog.csdn.net/chszs/article/details/50076641 https://github.com/Microsoft/vscode-go使用visual studio code开发Go程序
http://colobu.com/2016/04/21/use-vscode-to-develop-go-programs/
在Visual Studio Code中配置GO开发环境
http://www.cnblogs.com/zsy/p/5223957.html
页:
[1]