From 59ed43a8d3123afa698ea52880a715254c246887 Mon Sep 17 00:00:00 2001 From: Stewart-YU Date: Tue, 9 May 2023 09:04:27 +0800 Subject: [PATCH] Remove redundant parentheses --- pkg/prometheus-adapter/expression.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/prometheus-adapter/expression.go b/pkg/prometheus-adapter/expression.go index 6ceac7b71..c3ae983af 100644 --- a/pkg/prometheus-adapter/expression.go +++ b/pkg/prometheus-adapter/expression.go @@ -218,7 +218,7 @@ func GetMetricRulesFromDiscoveryRule(cfg []config.DiscoveryRule, mapper meta.RES // get MetricRule for metricName func MatchMetricRule(mrs []MetricRule, metricName string) *MetricRule { for _, metricRule := range mrs { - if match, _ := (regexp.Match(metricRule.MetricMatches, []byte(metricName))); match { + if match, _ := regexp.Match(metricRule.MetricMatches, []byte(metricName)); match { return &metricRule } }