Documentation ¶ Index ¶ func Decode(input map[string]any, c any) error type Setter Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Decode ¶ func Decode(input map[string]any, c any) error Decode decodes the given raw input interface to the target pointer c. It applies the default configuration if the target struct implements the Setter interface. It also perform a validation to all the fields of the configuration. Types ¶ type Setter ¶ type Setter interface { // ApplyDefaults applies the default options. ApplyDefaults() } Setter is the interface a configuration struct may implement to set the default options. Source Files ¶ View all Source files cfg.go Click to show internal directories. Click to hide internal directories.