mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Update pkg/labels/regexp.go
Co-authored-by: Marco Pracucci <marco@pracucci.com>
This commit is contained in:
parent
37416bf907
commit
d41e470693
|
@ -347,9 +347,9 @@ func stringMatcherFromRegexp(re *syntax.Regexp) StringMatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
// containsStringMatcher matches a string if it contains any of the substrings.
|
// containsStringMatcher matches a string if it contains any of the substrings.
|
||||||
// if left and right are not nil, it's a contains operation where left and right must match any strings.
|
// If left and right are not nil, it's a contains operation where left and right must match.
|
||||||
// if left is nil, it's a hasPrefix operation and right must match any strings.
|
// If left is nil, it's a hasPrefix operation and right must match.
|
||||||
// Finally if right is nil it's a hasSuffix operation and left must match any strings.
|
// Finally if right is nil it's a hasSuffix operation and left must match.
|
||||||
type containsStringMatcher struct {
|
type containsStringMatcher struct {
|
||||||
substrings []string
|
substrings []string
|
||||||
left StringMatcher
|
left StringMatcher
|
||||||
|
|
Loading…
Reference in a new issue