Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

Latest commit

 

History

History
39 lines (28 loc) · 951 Bytes

README.md

File metadata and controls

39 lines (28 loc) · 951 Bytes

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