LoadConfig reads a YAML configuration file from the given path, unmarshals it into a Config struct, applies environment variable overrides, and returns it. Parameters: - configFile: The path to the YAML configuration file Returns: - *Config: The loaded configuration - error: An error if the config
(configFile string)
| 722 | // - *Config: The loaded configuration |
| 723 | // - error: An error if the configuration could not be loaded |
| 724 | func LoadConfig(configFile string) (*Config, error) { |
| 725 | return LoadConfigOptional(configFile, false) |
| 726 | } |
| 727 | |
| 728 | // LoadConfigOptional reads YAML from configFile. |
| 729 | // If optional is true and the file is missing, it returns an empty Config. |
no test coverage detected