meerkat is a web framework base on golang.
- Customized effective http's router base on radix tree.
- Request data's binding from json, parameter etc.
- Support response with string, json, jsonp, html, xml, redirect, file, etc.
- Static files support.
- Template support.
- Extensible middleware.
- Custom log interface.
package main
import (
"github.com/wlgq2/meerkat"
"net/http"
)
func main() {
server := meerkat.New()
server.GET("/hello",func(context *meerkat.Context) error{
return context.String(http.StatusOK,"hello world.")
})
server.GET("/test*",func(context *meerkat.Context) error{
return context.String(http.StatusOK,"test.")
})
server.GET("/set:param",func(context *meerkat.Context) error{
return context.String(http.StatusOK,context.GetRouteParam("param"))
})
meerkat.LogInstance().Fatalln(server.Start(":8000"))
}