cfg

package
v2.19.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL