refactor: replace deprecated github.com/pkg/errors with errors pkg (#5577)
This commit is contained in:
@@ -18,8 +18,6 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// code, msg
|
||||
@@ -39,7 +37,7 @@ func Wrap(err error, c Code, msg string) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
return errors.Wrap(err, fmt.Sprintf(errFmt, c.Code(), msg))
|
||||
return fmt.Errorf(errFmt+": %w", c.Code(), msg, err)
|
||||
}
|
||||
|
||||
func Wrapf(err error, c Code, format string, a ...interface{}) error {
|
||||
|
||||
Reference in New Issue
Block a user