github go-playground/form v3.0.0
Release 3.0.0

latest releases: v4.3.0, v4.2.3, v4.2.2...
8 years ago

What's new?

  • Added Embedded struct support
  • Added omitempty just like std lib JSON

Made a version bump to v3.0.0 because the new Embedded struct logic has the potential to affect existing clients.

The Encoder has a new option SetAnonymousMode(...) by default it embeds anonymous struct info as if the fields were part of the containing struct itself; to continue to have it split out the Embedded structs just set mode to AnonymousSeparate and it will function exactly as previous versions.

please see examples detailing new functionality.

NOTE: if a struct and embedded struct have the same field, this will decode the value into both fields as there is no way to tell which you want; decoding into only the Embedded struct is still supported, again see examples.

Thanks to @danielchatfield and @michael2m for creating issues to get these features on the radar 👍

Don't miss a new form release

NewReleases is sending notifications on new releases.