Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load reads configuration from various sources and unmarshals it into a given struct.
It looks for configuration in the following order (later overrides earlier): 1. Local file, if `WithLocalYAML` is provided. 2. `.env` file in the current working directory. 3. Environment variables.
If any of the above sources result in an error (other than `os.ErrNotExist`), it will be returned.
If a source results in `os.ErrNotExist`, it will be skipped.
The final configuration will be unmarshaled into the given struct. If unmarshaling fails, an error will be returned.
Types ¶
Click to show internal directories.
Click to hide internal directories.