MCPcopy
hub / github.com/perkeep/perkeep / LoadFile

Function LoadFile

pkg/serverinit/serverinit.go:480–482  ·  view source on GitHub ↗

LoadFile returns a low-level "handler config" from the provided filename. If the config file doesn't contain a top-level JSON key of "handlerConfig" with boolean value true, the configuration is assumed to be a high-level "user config" file, and transformed into a low-level config.

(filename string)

Source from the content-addressed store, hash-verified

478// with boolean value true, the configuration is assumed to be a high-level
479// "user config" file, and transformed into a low-level config.
480func LoadFile(filename string) (*Config, error) {
481 return load(filename, nil)
482}
483
484// jsonFileImpl implements jsonconfig.File using a *bytes.Reader with
485// the contents slurped into memory.

Callers 3

RunCommandMethod · 0.92
RunCommandMethod · 0.92
loadConfigFunction · 0.92

Calls 1

loadFunction · 0.85

Tested by

no test coverage detected