mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
Update pkg/labels/regexp.go
Co-authored-by: Marco Pracucci <marco@pracucci.com>
This commit is contained in:
parent
5c5b38712f
commit
37416bf907
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue