Skip to content

Added setting default values using a new API

Latest

Choose a tag to compare

@bonnyr bonnyr released this 05 Nov 17:29
· 1 commit to master since this release
344b8c7

This release adds the ability to set default values to decoded fields.
Defaults are assigned for fields of basic types (int/float/string) that have the correct struct tag (default:"value")

Default behavior is not to assign defaults. To assign default, users call new API UnmarshalJSONIntoWithDefaults
of DecodeIntoWithDefaults