MCPcopy Create free account
hub / github.com/cel-expr/cel-go / NewFeature

Function NewFeature

common/env/env.go:733–735  ·  view source on GitHub ↗

NewFeature creates a new feature flag with a boolean enablement flag.

(name string, enabled bool)

Source from the content-addressed store, hash-verified

731
732// NewFeature creates a new feature flag with a boolean enablement flag.
733func NewFeature(name string, enabled bool) *Feature {
734 return &Feature{Name: name, Enabled: enabled}
735}
736
737// Feature represents a named boolean feature flag supported by CEL.
738type Feature struct {

Callers 7

envToFeaturesFunction · 0.92
ToConfigMethod · 0.92
TestEnvToConfigFunction · 0.92
TestEnvFromConfigFunction · 0.92
TestConfigFunction · 0.85
TestConfigValidateErrorsFunction · 0.85
TestFeatureValidateFunction · 0.85

Calls

no outgoing calls

Tested by 5

TestEnvToConfigFunction · 0.74
TestEnvFromConfigFunction · 0.74
TestConfigFunction · 0.68
TestConfigValidateErrorsFunction · 0.68
TestFeatureValidateFunction · 0.68