mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -2,9 +2,8 @@ package util
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"sync"
|
||||
|
||||
"github.com/hashicorp/go-multierror"
|
||||
)
|
||||
|
||||
// this is a decorator for a regular context that contains a custom error and returns the
|
||||
@@ -18,7 +17,7 @@ func (c *contextWithCancellableReason) Err() error {
|
||||
c.mtx.Lock()
|
||||
defer c.mtx.Unlock()
|
||||
if c.err != nil {
|
||||
return multierror.Append(c.Context.Err(), c.err)
|
||||
return errors.Join(c.Context.Err(), c.err)
|
||||
}
|
||||
return c.Context.Err()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user