ThinkSSL🔒 一键申购 5分钟快速签发 30天无理由退款 购买更放心 广告
# GO语言开发工具 在学习任何一门语言,选择一款适合自己的开发工具是非常重要的,它关系这你的学习和开发的进度。 建议大家使用 GoLand。 下面简单介绍几款golang的开发工具,关于这几款开发工具的介绍是从网上查找的,本人不做任何商用,如果有侵权,请联系本人删除。 ## GoLand GoLand 是 Jetbrains 家族的 Go 语言 IDE,有 30 天的免费试用期。但是网上还是有破解教程,至于如何破解在本文档里面就不详细介绍,这个就需要自己去网上查找了。 安装也很简单访问[Gogland 的下载页面](https://www.jetbrains.com/go/),根据你当期的系统环境三大平台(Mac、Linux、Windows)下载对应的软件。 ![](https://img.kancloud.cn/9b/30/9b3055fdd1a10c45f2162457d0557dda_825x521.png) ## LiteIDE LiteIDE 是一款开源、跨平台的轻量级 Go 语言集成开发环境(IDE)。 支持的操作系统 Windows x86 (32-bit or 64-bit) Linux x86 (32-bit or 64-bit) 下载地址 :http://sourceforge.net/projects/liteide/files/ 源码地址 :https://github.com/visualfc/liteide ![](https://img.kancloud.cn/9a/07/9a07a89d7e3ab855177edb6a959d5eb0_1013x779.png) ## Eclipse Eclipse 也是非常常用的开发利器,以下介绍如何使用 Eclipse 来编写 Go 程序。 ![](https://img.kancloud.cn/99/ac/99acb70f888b30e9a38e0e10b5146adf_991x833.png) Eclipse 编辑 Go 的主界面 1. 首先下载并安装好[Eclipse](http://www.eclipse.org/) 2. 下载[goclipse](http://goclipse.github.io/)插件[https://github.com/GoClipse/goclipse/blob/latest/documentation/Installation.md#installation](https://github.com/GoClipse/goclipse/blob/latest/documentation/Installation.md#installation) 3. 下载 gocode,用于 go 的代码补全提示 gocode 的 github 地址: ~~~ https://github.com/nsf/gocode ~~~ 在 Windows下要安装 git,通常用[msysgit](https://gitforwindows.org/)。 再在 cmd 下安装: ~~~ go get -u github.com/nsf/gocode ~~~ 也可以下载代码,直接用 go build 来编译,会生成 gocode.exe 4. 下载[MinGW](http://sourceforge.net/projects/mingw/files/MinGW/)并按要求装好 5. 配置插件 Windows->Reference->Go (1)、配置 Go 的编译器 ![](https://img.kancloud.cn/99/41/9941d778d9824fc1e8c2a7957d86bc60_820x552.png) 设置 Go 的一些基础信息 (2)、配置 Gocode(可选,代码补全),设置 Gocode 路径为之前生成的 gocode.exe 文件 ![](https://img.kancloud.cn/cc/59/cc59995cdea7960f840ceaaf31b65623_780x561.png) 设置 gocode 信息 (3)、配置 GDB(可选,做调试用),设置 GDB 路径为 MingW 安装目录下的 gdb.exe 文件 ![](https://img.kancloud.cn/d6/19/d61920dce6251f4d230856d66d96d447_629x550.png) 设置 GDB 信息 测试是否成功 新建一个 go 工程,再建立一个 hello.go。如下图: ![](https://img.kancloud.cn/d8/3a/d83a0908f294a1023013aae665f15569_769x643.png) 新建项目编辑文件 调试如下(要在 console 中用输入命令来调试): ![](https://img.kancloud.cn/d7/81/d781eff19638ac4c3bb10ea96f08f23a_769x643.png)