MCPcopy Index your code
hub / github.com/netdata/netdata / loadConfigFile

Function loadConfigFile

src/go/plugin/framework/vnodes/vnodes.go:164–176  ·  view source on GitHub ↗
(conf any, path string)

Source from the content-addressed store, hash-verified

162}
163
164func loadConfigFile(conf any, path string) error {
165 f, err := os.Open(path)
166 if err != nil {
167 return err
168 }
169 defer func() { _ = f.Close() }()
170
171 if err := yaml.NewDecoder(f).Decode(conf); err != nil && err != io.EOF {
172 return err
173 }
174
175 return nil
176}
177
178func isStockConfig(path string) bool {
179 return pluginconfig.IsStock(path)

Callers 1

readConfDirFunction · 0.85

Calls 2

CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…