MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / LoadConfig

Function LoadConfig

internal/config/config.go:724–726  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

722// - *Config: The loaded configuration
723// - error: An error if the configuration could not be loaded
724func 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.

Callers 1

reloadConfigMethod · 0.92

Calls 1

LoadConfigOptionalFunction · 0.70

Tested by

no test coverage detected