Skip to content

Commit

Permalink
Remove braces from suggestion (#3568)
Browse files Browse the repository at this point in the history
This commit removes the open and close braces from the suggestion
as braces do not make sense in the configuration file. This does
not change the behavior of the suggestion whatsoever as these
are optional.

Signed-off-by: George Robinson <[email protected]>
  • Loading branch information
grobinson-grafana authored Oct 30, 2023
1 parent b5b5a1d commit 7cdecbf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions matchers/compat/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,12 @@ func fallbackMatchersParser(l log.Logger) matchersParser {
return nil, invalidErr
}
var sb strings.Builder
sb.WriteRune('{')
for i, n := range m {
sb.WriteString(n.String())
if i < len(m)-1 {
sb.WriteRune(',')
}
}
sb.WriteRune('}')
suggestion := sb.String()
// The input is valid in the old pkg/labels parser, but not the
// new matchers/parse parser.
Expand Down

0 comments on commit 7cdecbf

Please sign in to comment.