AddQualifier implements the Attribute interface method.
(qual Qualifier)
| 350 | |
| 351 | // AddQualifier implements the Attribute interface method. |
| 352 | func (m *attributeMatcher) AddQualifier(qual Qualifier) (Attribute, error) { |
| 353 | // Add the qualifier to the embedded NamespacedAttribute. If the input to the Resolve |
| 354 | // method is not a PartialActivation, or does not match an unknown attribute pattern, the |
| 355 | // Resolve method is directly invoked on the underlying NamespacedAttribute. |
| 356 | _, err := m.NamespacedAttribute.AddQualifier(qual) |
| 357 | if err != nil { |
| 358 | return nil, err |
| 359 | } |
| 360 | // The attributeMatcher overloads TryResolve and will attempt to match unknown patterns against |
| 361 | // the variable name and qualifier set contained within the Attribute. These values are not |
| 362 | // directly inspectable on the top-level NamespacedAttribute interface and so are tracked within |
| 363 | // the attributeMatcher. |
| 364 | m.qualifiers = append(m.qualifiers, qual) |
| 365 | return m, nil |
| 366 | } |
| 367 | |
| 368 | // Resolve is an implementation of the NamespacedAttribute interface method which tests |
| 369 | // for matching unknown attribute patterns and returns types.Unknown if present. Otherwise, |
nothing calls this directly
no test coverage detected