AddQualifier appends a qualifier that will always and only perform a presence test.
(q Qualifier)
| 260 | |
| 261 | // AddQualifier appends a qualifier that will always and only perform a presence test. |
| 262 | func (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 | |
| 270 | type testOnlyQualifier struct { |
| 271 | ConstantQualifier |
nothing calls this directly
no test coverage detected