标签:
go get github.com/astaxie/beego
vim hello.go
package main import "github.com/astaxie/beego" func main() { beego.Run() }
编译运行
go build -o hello hello.go
./hello
例子2:
package main import ( "github.com/astaxie/beego" ) type MainController struct { beego.Controller } func (this *MainController) Get() { this.Ctx.WriteString("hello world") } func main() { beego.Router("/", &MainController{}) beego.Run() }
编译运行
go build -o hello hello.go
./hello
参考:
http://beego.me/
http://beego.me/quickstart
标签:
原文地址:http://www.cnblogs.com/super-d2/p/4925116.html