From eaadde65e5a8acefffeca60b1c9e2b1e2275e39a Mon Sep 17 00:00:00 2001 From: Hedius Date: Fri, 24 May 2024 21:25:07 +0200 Subject: [PATCH] remove unused function --- prometheus/matcher.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/prometheus/matcher.go b/prometheus/matcher.go index 1d4b9b62c..f91292e18 100644 --- a/prometheus/matcher.go +++ b/prometheus/matcher.go @@ -26,28 +26,6 @@ var promqlMatchMap = map[labels.MatchType]finder.TaggedTermOp{ labels.MatchNotRegexp: finder.TaggedTermNotMatch, } -func makeTaggedFromPromPB(matchers []*prompb.LabelMatcher) ([]finder.TaggedTerm, error) { - terms := make([]finder.TaggedTerm, 0, len(matchers)) - for i := 0; i < len(matchers); i++ { - if matchers[i] == nil { - continue - } - op, ok := prompbMatchMap[matchers[i].Type] - if !ok { - return nil, fmt.Errorf("unknown matcher type %#v", matchers[i].GetType()) - } - terms = append(terms, finder.TaggedTerm{ - Key: matchers[i].Name, - Value: matchers[i].Value, - Op: op, - }) - } - - sort.Sort(finder.TaggedTermList(terms)) - - return terms, nil -} - func makeTaggedFromPromQL(matchers []*labels.Matcher) ([]finder.TaggedTerm, error) { terms := make([]finder.TaggedTerm, 0, len(matchers)) for i := 0; i < len(matchers); i++ {