A query param auto mapping middleware for tango
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
bind.go
bind_test.go

README.md

Bind Build Status

** HEAVILLY DEVELOPMENT ** Bind is a query param auto mapping middleware for Tango. Please use binding

Installation

go get github.com/tango-contrib/bind

Simple Example

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))
}

Getting Help