MCPcopy Create free account
hub / github.com/KeepSec-Technologies/Mail2Go / loadConfig

Function loadConfig

config.go:19–35  ·  view source on GitHub ↗
(filePath string)

Source from the content-addressed store, hash-verified

17}
18
19func loadConfig(filePath string) (Config, error) {
20 var config Config
21
22 file, err := os.Open(filePath)
23 if err != nil {
24 return config, err
25 }
26 defer file.Close()
27
28 decoder := json.NewDecoder(file)
29 err = decoder.Decode(&config)
30 if err != nil {
31 return config, err
32 }
33
34 return config, nil
35}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected