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

Function LoadFeatureFlagsFile

pkg/csconfig/fflag.go:28–35  ·  view source on GitHub ↗

LoadFeatureFlags parses feature.yaml to enable feature flags.

(configPath string, logger *log.Logger)

Source from the content-addressed store, hash-verified

26
27// LoadFeatureFlags parses feature.yaml to enable feature flags.
28func LoadFeatureFlagsFile(configPath string, logger *log.Logger) error {
29 featurePath := GetFeatureFilePath(configPath)
30
31 if err := fflag.Crowdsec.SetFromYamlFile(featurePath, logger); err != nil {
32 return fmt.Errorf("file %s: %s", featurePath, err)
33 }
34 return nil
35}
36
37// ListFeatureFlags returns a list of the enabled feature flags.
38func ListFeatureFlags() string {

Callers 2

LoadConfigFunction · 0.92
NewCommandMethod · 0.92

Calls 2

GetFeatureFilePathFunction · 0.85
SetFromYamlFileMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…