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

tango-contrib/bind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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