From 757bde0cb5094411750bc6e50f08e022f25e6ee9 Mon Sep 17 00:00:00 2001 From: George Robinson Date: Fri, 19 Jul 2024 14:26:24 +0100 Subject: [PATCH] chore: replace pkg/errors with errors (#13582) --- pkg/pattern/metric/evaluator.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/pattern/metric/evaluator.go b/pkg/pattern/metric/evaluator.go index eb8bd4ac2d355..d15d98dd9b1b0 100644 --- a/pkg/pattern/metric/evaluator.go +++ b/pkg/pattern/metric/evaluator.go @@ -6,7 +6,6 @@ import ( "sort" "time" - "github.com/pkg/errors" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql" @@ -127,7 +126,7 @@ func (ev *DefaultEvaluatorFactory) NewStepEvaluator( } if e.Grouping == nil { - return nil, errors.Errorf("aggregation operator '%q' without grouping", e.Operation) + return nil, fmt.Errorf("aggregation operator '%q' without grouping", e.Operation) } nextEvaluator, err := evFactory.NewStepEvaluator(ctx, evFactory, e.Left, from, through, step) if err != nil { @@ -158,7 +157,7 @@ func (ev *DefaultEvaluatorFactory) NewStepEvaluator( ) return NewSampleRangeAggEvaluator(loki_iter.NewPeekingSampleIterator(it), e, params, e.Left.Offset) default: - return nil, errors.Errorf("unexpected expr type (%T)", e) + return nil, fmt.Errorf("unexpected expr type (%T)", e) } }