MCPcopy Index your code
hub / github.com/crowdsecurity/crowdsec / GetFeatureFilePath

Function GetFeatureFilePath

pkg/csconfig/fflag.go:22–25  ·  view source on GitHub ↗

FeatureFlagsFileLocation returns the path to the feature.yaml file. The file is in the same directory as config.yaml, which is provided as the fist parameter. This can be different than ConfigPaths.ConfigDir because we have not read config.yaml yet so we don't know the value of ConfigDir.

(configPath string)

Source from the content-addressed store, hash-verified

20// as the fist parameter. This can be different than ConfigPaths.ConfigDir
21// because we have not read config.yaml yet so we don't know the value of ConfigDir.
22func GetFeatureFilePath(configPath string) string {
23 dir := filepath.Dir(configPath)
24 return filepath.Join(dir, "feature.yaml")
25}
26
27// LoadFeatureFlags parses feature.yaml to enable feature flags.
28func LoadFeatureFlagsFile(configPath string, logger *log.Logger) error {

Callers 2

featureFlagsMethod · 0.92
LoadFeatureFlagsFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…