MCPcopy
hub / github.com/caddyserver/caddy / LoadConfig

Function LoadConfig

cmd/main.go:108–110  ·  view source on GitHub ↗

LoadConfig loads the config from configFile and adapts it using adapterName. If adapterName is specified, configFile must be also. If no configFile is specified, it tries loading a default config file. The lack of a config file is not treated as an error, but false will be returned if there is no co

(configFile, adapterName string)

Source from the content-addressed store, hash-verified

106// - adapter used ("" if none)
107// - error, if any
108func LoadConfig(configFile, adapterName string) ([]byte, string, string, error) {
109 return loadConfigWithLogger(caddy.Log(), configFile, adapterName)
110}
111
112func isCaddyfile(configFile, adapterName string) (bool, error) {
113 if adapterName == "caddyfile" {

Callers 5

determineStorageFunction · 0.85
cmdRunFunction · 0.85
cmdReloadFunction · 0.85
cmdValidateConfigFunction · 0.85
DetermineAdminAPIAddressFunction · 0.85

Calls 1

loadConfigWithLoggerFunction · 0.85

Tested by

no test coverage detected