martini-contrib / binding

Martini handler for mapping and validating a raw request into a structure.
MIT License
140 stars 47 forks source link

Pointers support #50

Closed lukashes closed 8 years ago

lukashes commented 8 years ago

Pointers of basic types is very useful feature for patching resources

PATCH example.com/user/1?is_active=true

// After binding saved only IsActive field into DB
type UserForm struct {
    IsActive     *bool   `form:"is_active"`
    OtherStuff *string   `form:"other_stuff"`
}
mholt commented 8 years ago

Makes sense. Thanks!