Skip to content

Releases: gorilla/schema

Choose a tag to compare

Fixes a case where schema panicked when provided a pointer to embedded structs.


Choose a tag to compare

Decoding errors now have types for more comprehensive error reporting:

  • UnknownKeyError is returned when an unknown key is encountered in the source map and the decoder is not set to ignore unknown keys.
  • EmptyFieldError is returned when a required field is empty.

Both error types have a Key attribute that can be inspected to determine the field that caused the error.

Choose a tag to compare
Fix handling of empty value. (#104)

If a value is decoding into a type that implements the
encoding.TextUnmarshaler interface, the decoder should use it's
UnmarshalText method in all instances including an empty value.

Previously, would ignore the method decoding the field as the empty
value of the type.
Choose a tag to compare
Fix handling of situation where a slice of structs implments the
encoding.TextUnmarshaler interface, previously it would return "invalid
path" error.

Includes, some minor refactoring and documentation to clarify
`isUnmarshaler` output.