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

Function attrQualify

interpreter/attributes.go:1339–1349  ·  view source on GitHub ↗

attrQualify performs a qualification using the result of an attribute evaluation.

(fac AttributeFactory, vars Activation, obj any, qualAttr Attribute)

Source from the content-addressed store, hash-verified

1337
1338// attrQualify performs a qualification using the result of an attribute evaluation.
1339func attrQualify(fac AttributeFactory, vars Activation, obj any, qualAttr Attribute) (any, error) {
1340 val, err := qualAttr.Resolve(vars)
1341 if err != nil {
1342 return nil, err
1343 }
1344 qual, err := fac.NewQualifier(nil, qualAttr.ID(), val, qualAttr.IsOptional())
1345 if err != nil {
1346 return nil, err
1347 }
1348 return qual.Qualify(vars, obj)
1349}
1350
1351// attrQualifyIfPresent conditionally performs the qualification of the result of attribute is present
1352// on the target object.

Callers 5

QualifyMethod · 0.85
QualifyMethod · 0.85
QualifyMethod · 0.85
QualifyMethod · 0.85
QualifyMethod · 0.85

Calls 5

QualifyMethod · 0.95
ResolveMethod · 0.65
NewQualifierMethod · 0.65
IDMethod · 0.65
IsOptionalMethod · 0.65

Tested by

no test coverage detected