Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(dst any, opts LoadOptions) error
Load the configuration from a file and from the environment. "dst" must be a pointer to a struct. Note: this method currently does not work correctly with properties of the struct that are pointers.
Types ¶
type LoadOptions ¶
type LoadOptions struct { // Optional path to a YAML (or JSON) file to load FilePath string // Optional prefix for env vars. EnvPrefix string // If true, values loaded from the config file which have a zero value (e.g. empty strings or number 0's) are ignored. IgnoreZeroValuesInConfig bool }
LoadOptions contains options for the Load method.
Click to show internal directories.
Click to hide internal directories.