Chore: Replace go-multierror with errors package (#66432)

* code refactor and type assertions added to tests

* no-lint rule added for specific line
This commit is contained in:
SatVeer Singh
2023-06-19 14:59:45 +05:30
committed by GitHub
parent a75752b085
commit 1bfa3a0f1e
8 changed files with 25 additions and 30 deletions

View File

@@ -10,7 +10,6 @@ import (
"github.com/benbjohnson/clock"
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/hashicorp/go-multierror"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/services/ngalert/eval"
@@ -72,7 +71,7 @@ func (e *Engine) Test(ctx context.Context, user *user.SignedInUser, rule *models
evaluator, err := backtestingEvaluatorFactory(ruleCtx, e.evalFactory, user, rule.GetEvalCondition())
if err != nil {
return nil, multierror.Append(ErrInvalidInputData, err)
return nil, errors.Join(ErrInvalidInputData, err)
}
stateManager := e.createStateManager()