thinkgo:用Go(Golang)编写的轻量级MVC框架
ThinkGo
ThinkGo是用Go(Golang)编写的轻量级MVC框架。
安装
唯一的要求是
go get -u github.com/forgoer/thinkgo
快速开始
package main
import (
"fmt"
"github.com/forgoer/thinkgo"
"github.com/forgoer/thinkgo/think"
)
func main () {
th := thinkgo . New ()
th . RegisterRoute ( func ( route * think. Route ) {
route . Get ( "/" , func ( req * think. Req ) * think. Res {
return think . Text ( "Hello ThinkGo !" )
})
route . Get ( "/ping" , func ( req * think. Req ) * think. Res {
return think . Json ( map [ st