AddQualifier appends a qualifier that will always and only perform a presence test.
(q Qualifier)
| 275 | |
| 276 | // AddQualifier appends a qualifier that will always and only perform a presence test. |
| 277 | func (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 | |
| 285 | type testOnlyQualifier struct { |
| 286 | ConstantQualifier |
nothing calls this directly
no test coverage detected