Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedius committed May 24, 2024
1 parent 19ab8a8 commit eaadde6
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions prometheus/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++ {
Expand Down

0 comments on commit eaadde6

Please sign in to comment.