feat(errorx): add errorx

This commit is contained in:
bandl 2021-09-23 10:11:54 +08:00
parent ea83b319de
commit 36d18c1368
1 changed files with 12 additions and 0 deletions

12
pkg/errorx/err.go Normal file
View File

@ -0,0 +1,12 @@
package errorx
import (
"errors"
"fmt"
)
// New TODO 添加链路追踪等 @bandl @lgq
func New(msg string, opt ...interface{}) error {
msg = fmt.Sprintf(msg, opt...)
return errors.New(msg)
}