MCPcopy
hub / github.com/crowdsecurity/crowdsec / cfg

Method cfg

cmd/crowdsec-cli/main.go:89–91  ·  view source on GitHub ↗

cfg() is a helper function to get the configuration loaded from config.yaml, we pass it to subcommands because the file is not read until the Execute() call

()

Source from the content-addressed store, hash-verified

87// cfg() is a helper function to get the configuration loaded from config.yaml,
88// we pass it to subcommands because the file is not read until the Execute() call
89func (*cliRoot) cfg() *csconfig.Config {
90 return csConfig
91}
92
93// loadConfigFor loads the configuration file for the given sub-command.
94// If the sub-command does not need it, it returns a default configuration.

Callers 15

registerMethod · 0.80
newRegisterCmdMethod · 0.80
StatusMethod · 0.80
newStatusCmdMethod · 0.80
alertsToTableMethod · 0.80
displayOneAlertMethod · 0.80
NewCommandMethod · 0.80
inspectMethod · 0.80
newFlushCmdMethod · 0.80
NewCommandMethod · 0.80
getPluginConfigsMethod · 0.80
getProfilesConfigsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected