搭建Go语言(Golang)开发环境

By admin, 28 一月, 2016

首先去Go语言官网下载安装包,安装完成后go命令会放在/usr/local/go/bin/go,需要在~/.profile里把路径添加到PATH

定义GOPATH=/Users/hgneng/gocode,同样添加到~/.profile里

然后去beego官网下载一个中国人写的开发框架(中国人的开源项目是越来越见得人了)。

go get github.com/astaxie/beego
go get github.com/beego/bee

安装常用模块:
go get github.com/astaxie/beego/orm
go get github.com/astaxie/beego/plugins/cors

接着安装Subline Text 3编辑器、Sublime Package Control,重启Sublime3,安装GoSubline

如果希望对Go程序进行单步调试,可以参考: godebug

参考:http://resources.distilnetworks.com/h/i/53821915-programming-in-go-golang-setting-up-a-mac-os-x-development-environment/181642

 

 

标签

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"Drupal10"