refactor: replace deprecated github.com/pkg/errors with errors pkg (#5577)

This commit is contained in:
Oleksandr Redko
2024-02-02 16:56:28 +02:00
committed by GitHub
parent 2dafe7709a
commit 426aad68dc
14 changed files with 34 additions and 55 deletions

View File

@@ -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 {