Update pkg/labels/regexp.go

Co-authored-by: Marco Pracucci <marco@pracucci.com>
This commit is contained in:
Cyril Tovena 2021-10-11 11:13:53 +02:00 committed by GitHub
parent 37416bf907
commit d41e470693
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -347,9 +347,9 @@ func stringMatcherFromRegexp(re *syntax.Regexp) StringMatcher {
}
// 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 is nil, it's a hasPrefix operation and right must match any strings.
// Finally if right is nil it's a hasSuffix operation and left 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.
// Finally if right is nil it's a hasSuffix operation and left must match.
type containsStringMatcher struct {
substrings []string
left StringMatcher