Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetStructValues ¶
func SetStructValues(target interface{}) error
SetStructValues sets struct field default values defined in `default` tags.
Types ¶
type Defaulter ¶
type Defaulter interface { // SetDefaults sets the object's default values. This method must modify the object. SetDefaults() error }
Defaulter allows defining default values for an object. Note that because the methods in this interface directly modify an object's properties, it should only be implemented by objects that support pointer receivers.
Click to show internal directories.
Click to hide internal directories.