Update pkg/labels/regexp.go

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

View file

@ -324,7 +324,7 @@ func stringMatcherFromRegexp(re *syntax.Regexp) StringMatcher {
if left == nil && right == nil { if left == nil && right == nil {
// if there's no any matchers on both side it's a concat of literals // if there's no any matchers on both side it's a concat of literals
if len(matches) > 0 { if len(matches) > 0 {
var or []StringMatcher or := make([]StringMatcher, 0, len(matches))
for _, match := range matches { for _, match := range matches {
or = append(or, &equalStringMatcher{ or = append(or, &equalStringMatcher{
s: match, s: match,