monoculum / formam

a package for decode form's values into struct in Go
Apache License 2.0
190 stars 19 forks source link

added support for `formam:"-"` to skip a field from binding #11

Closed markbates closed 7 years ago

markbates commented 7 years ago

On some structs you don't want to bind a form field, even it is in the request. The standard way of doing this is to use a struct tag with - as the value, see JSON and XML in the standard library. This PR adds support for that in formam.

struct {
  Name string `formam:"-"`
}
emilgpa commented 7 years ago

I had this in the roadmap. Thanks!

markbates commented 7 years ago

You're welcome! :)