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

Method AddQualifier

interpreter/interpretable.go:262–268  ·  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

260
261// AddQualifier appends a qualifier that will always and only perform a presence test.
262func (test *evalTestOnly) AddQualifier(q Qualifier) (Attribute, error) {
263 cq, ok := q.(ConstantQualifier)
264 if !ok {
265 return nil, fmt.Errorf("test only expressions must have constant qualifiers: %v", q)
266 }
267 return test.InterpretableAttribute.AddQualifier(&testOnlyQualifier{ConstantQualifier: cq})
268}
269
270type testOnlyQualifier struct {
271 ConstantQualifier

Callers

nothing calls this directly

Calls 1

AddQualifierMethod · 0.65

Tested by

no test coverage detected