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

Function envToFeatures

tools/compiler/compiler.go:313–322  ·  view source on GitHub ↗
(pbEnv *configpb.Environment)

Source from the content-addressed store, hash-verified

311}
312
313func envToFeatures(pbEnv *configpb.Environment) ([]*env.Feature, error) {
314 features := make([]*env.Feature, 0, len(pbEnv.GetFeatures())+1)
315 for _, feature := range pbEnv.GetFeatures() {
316 features = append(features, env.NewFeature(feature.GetName(), feature.GetEnabled()))
317 }
318 if pbEnv.GetEnableMacroCallTracking() {
319 features = append(features, env.NewFeature("cel.feature.macro_call_tracking", true))
320 }
321 return features, nil
322}
323
324func envToValidators(pbEnv *configpb.Environment) ([]*env.Validator, error) {
325 validators := make([]*env.Validator, 0, len(pbEnv.GetValidators()))

Callers 1

envProtoToConfigFunction · 0.85

Calls 2

NewFeatureFunction · 0.92
GetNameMethod · 0.45

Tested by

no test coverage detected