From 97e0c754c01fabf18a98cb4a3435c140ccce6a35 Mon Sep 17 00:00:00 2001 From: Kiril Vladimirov Date: Thu, 21 Jan 2021 10:56:06 +0200 Subject: [PATCH] Remove NewRegexpMatcher and panic on error instead Signed-off-by: Kiril Vladimirov --- pkg/labels/matcher.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/labels/matcher.go b/pkg/labels/matcher.go index 8fea7877..a0f97413 100644 --- a/pkg/labels/matcher.go +++ b/pkg/labels/matcher.go @@ -152,11 +152,3 @@ func (ms Matchers) String() string { return buf.String() } - -// NewRegexpMatcher returns a matcher with already compiled regexp.Regexp. -// -// TODO(vladimiroff): Get rid of this function once migration from -// types.Matcher is complete. -func NewRegexpMatcher(n string, re *regexp.Regexp) *Matcher { - return &Matcher{Type: MatchRegexp, Name: n, Value: re.String(), re: re} -}