Skip to content

Releases: gorilla/schema

v1.3.0

26 Mar 22:48
Compare
Choose a tag to compare

What's Changed

  • Remove log.Fatal() usage in encoder.go by @h2570su in #207
  • Add default tag by @zak905 in #183
  • update readme: add informations about the default tag option usage by @zak905 in #209

New Contributors

Full Changelog: v1.2.1...v1.3.0

Release v1.2.1

05 Nov 02:24
9dff76b
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2.0...v1.2.1

v1.2.0

22 Aug 21:08
7f62815
Compare
Choose a tag to compare

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

CHANGELOG

Fine-grained decoding errors

22 Mar 17:01
124d17e
Compare
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.

Fix handling of empty values for types that implement TextUnmarshaler

21 Mar 16:34
Compare
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.

v1.0.1: Fix slice of structs TextUnmarshaler. (#103)

07 Mar 15:52
Compare
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.