Documentation
¶
Overview ¶
Package config can be used to load data to a struct which is defined by the "env" tag.
Data may come from a file and/or the os environment
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadFromEnvironment ¶
LoadFromEnvironment loads environment data into the target struct.
target must be a pointer, otherwise it will return an error.
func LoadFromFile ¶
LoadFromFile loads config from a file with the given format parser.
- filename: Path + filename of the config file
- target: target struct to load the config to (MUST be a pointer to a struct)
- format: format type (YAML or JSON)
Types ¶
Click to show internal directories.
Click to hide internal directories.