Description

Bind takes the name and type of the desired parameter and constructs it from one or more values from Params.

Example

Request:

url?id=123&ol[0]=1&ol[1]=2&ul[]=str&ul[]=array&user.Name=rob

Action:

Example.Action(id int, ol []int, ul []string, user User)

Calls:

Bind(params, "id", int): 123
Bind(params, "ol", []int): {1, 2}
Bind(params, "ul", []string): {"str", "array"}
Bind(params, "user", User): User{Name:"rob"}

Note that only exported struct fields may be bound.

Bind is referenced in 5 repositories

github.com/revel/revel github.com/leanote/leanote github.com/fernandez14/revmgo

...