Matches returns true if the qualifier pattern is a wildcard, or the Qualifier implements the qualifierValueEquator interface and its IsValueEqualTo returns true for the qualifier pattern.
(q Qualifier)
| 115 | // Matches returns true if the qualifier pattern is a wildcard, or the Qualifier implements the |
| 116 | // qualifierValueEquator interface and its IsValueEqualTo returns true for the qualifier pattern. |
| 117 | func (qpat *AttributeQualifierPattern) Matches(q Qualifier) bool { |
| 118 | if qpat.wildcard { |
| 119 | return true |
| 120 | } |
| 121 | qve, ok := q.(qualifierValueEquator) |
| 122 | return ok && qve.QualifierValueEquals(qpat.value) |
| 123 | } |
| 124 | |
| 125 | // qualifierValueEquator defines an interface for determining if an input value, of valid map key |
| 126 | // type, is equal to the value held in the Qualifier. This interface is used by the |
no test coverage detected