【文件属性】:
文件名称:go-martini:Go 和 Martini 入门
文件大小:132KB
文件格式:ZIP
更新时间:2021-06-09 23:08:13
Go
背景
Martini 是一个轻量级的 Go 网络框架。
Martini 提供了一个 HTTP 服务器以及一个轻量级的路由 DSL 和参数解析。
Martini 非常适合服务和 API。
安装 Go
本指南将重点介绍 OSX。
首先确保安装了自制软件并且是最新的。
接下来安装 Go
brew install go
接下来确保适当设置环境变量
export GOROOT=/usr/local/opt/go/libexec
export GOPATH= $HOME /go
export PATH= $PATH :/usr/local/opt/go/libexec/bin
export PATH= $PATH : $GOPATH /bin
为了让 godeps 之类的东西正常工作,你必须把你的项目放在$GOPATH/src
设置项目
在$GOPATH/src 中为您的项目创建一个
【文件预览】:
go-martini-master
----templates()
--------hello.amber(11B)
----server.go(405B)
----readme.md(3KB)
----Godeps()
--------Godeps.json(708B)
--------Readme(136B)
--------_workspace()