mapper

package module
v0.0.0-...-d241d07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2017 License: MIT Imports: 9 Imported by: 0

README

Go URL Mapper Build Status

Package mapping query string to struct using reflection and tags.

Example:

type Request struct {
    Origin string `query:"origin"` 
    Destination string `query:"destination"`
    NumOfPassengers int `query:"adults"`
    OutwardDate time.Time `query:"outward"`
    ReturnDate time.Time `query:"inward,omitempty"`
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(path url.Values, v interface{}) error

Types

type TagOptions

type TagOptions map[string]string

func TagOptionsFromString

func TagOptionsFromString(tag string) (string, TagOptions)

func (TagOptions) Contains

func (tag TagOptions) Contains(tagName string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL