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

Method AddQualifier

interpreter/interpretable.go:277–283  ·  view source on GitHub ↗

AddQualifier appends a qualifier that will always and only perform a presence test.

(q Qualifier)

Source from the content-addressed store, hash-verified

275
276// AddQualifier appends a qualifier that will always and only perform a presence test.
277func (test *evalTestOnly) AddQualifier(q Qualifier) (Attribute, error) {
278 cq, ok := q.(ConstantQualifier)
279 if !ok {
280 return nil, fmt.Errorf("test only expressions must have constant qualifiers: %v", q)
281 }
282 return test.InterpretableAttribute.AddQualifier(&testOnlyQualifier{ConstantQualifier: cq})
283}
284
285type testOnlyQualifier struct {
286 ConstantQualifier

Callers

nothing calls this directly

Calls 1

AddQualifierMethod · 0.65

Tested by

no test coverage detected