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

@@ -7,7 +7,6 @@ import (
"sync"
"github.com/gogo/protobuf/proto"
"github.com/pkg/errors"
"github.com/beego/beego/v2/core/logs"
)
@@ -110,7 +109,7 @@ func (c *aliLSWriter) Init(config string) error {
if len(c.Formatter) > 0 {
fmtr, ok := logs.GetFormatter(c.Formatter)
if !ok {
return errors.New(fmt.Sprintf("the formatter with name: %s not found", c.Formatter))
return fmt.Errorf("the formatter with name: %s not found", c.Formatter)
}
c.formatter = fmtr
}