mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Add better comments
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
This commit is contained in:
parent
d41e470693
commit
c8dfba9fa4
|
@ -320,11 +320,12 @@ func stringMatcherFromRegexp(re *syntax.Regexp) StringMatcher {
|
||||||
}
|
}
|
||||||
re.Sub = re.Sub[:len(re.Sub)-1]
|
re.Sub = re.Sub[:len(re.Sub)-1]
|
||||||
}
|
}
|
||||||
|
// findSetMatches will returns only literals that are case sensitive.
|
||||||
matches := findSetMatches(re, "")
|
matches := findSetMatches(re, "")
|
||||||
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 {
|
||||||
or := make([]StringMatcher, 0, len(matches))
|
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