MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / TryLoadFile

Method TryLoadFile

pkg/config/config_windows.go:331–334  ·  view source on GitHub ↗

TryLoadFile attempts to load the configuration file from specified path on the file system.

(file string)

Source from the content-addressed store, hash-verified

329
330// TryLoadFile attempts to load the configuration file from specified path on the file system.
331func (c *Config) TryLoadFile(file string) error {
332 c.viper.SetConfigFile(file)
333 return c.viper.ReadInConfig()
334}
335
336// Validate ensures that all configuration options provided by user have the expected values. It returns
337// a list of validation errors prefixed with the offending configuration property/flag.

Callers 8

TestTransformersFunction · 0.80
TestNewFromYamlFileFunction · 0.80
TestNewFromJsonFileFunction · 0.80
TestConfigPrintFunction · 0.80
TestAMQPOutputFunction · 0.80
TestHTTPOutputFunction · 0.80
TestEventlogOutputFunction · 0.80
InitConfigAndLoggerFunction · 0.80

Calls

no outgoing calls

Tested by 7

TestTransformersFunction · 0.64
TestNewFromYamlFileFunction · 0.64
TestNewFromJsonFileFunction · 0.64
TestConfigPrintFunction · 0.64
TestAMQPOutputFunction · 0.64
TestHTTPOutputFunction · 0.64
TestEventlogOutputFunction · 0.64