MCPcopy Index your code
hub / github.com/foxcpp/maddy / ReadConfig

Function ReadConfig

maddy.go:348–360  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

346}
347
348func ReadConfig(path string) ([]config.Node, error) {
349 f, err := os.Open(path)
350 if err != nil {
351 return nil, err
352 }
353 defer func() {
354 if err := f.Close(); err != nil {
355 log.Println("failed to close config file:", err)
356 }
357 }()
358
359 return parser.Read(f, path)
360}
361
362func moduleConfigure(configPath string) (*container.C, error) {
363 c := container.New()

Callers 2

getCfgBlockModuleFunction · 0.92
moduleConfigureFunction · 0.85

Calls 4

PrintlnFunction · 0.92
OpenMethod · 0.65
CloseMethod · 0.65
ReadMethod · 0.45

Tested by

no test coverage detected