** HEAVILLY DEVELOPMENT ** Bind is a query param auto mapping middleware for Tango. Please use binding
go get github.com/tango-contrib/bind
package main
import (
"github.com/lunny/tango"
"github.com/tango-contrib/bind"
)
type BindExample struct {
Id int64
Name string
}
func (a *BindExample) Get() string {
return fmt.Sprintf("%d-%s", a.Id, a.Name)
}
func main() {
o := tango.Classic()
o.Use(bind.Default())
o.Get("/", new(BindExample))
}