forked from p53841790/wheat-cache
feat(errorx): add errorx
This commit is contained in:
parent
ea83b319de
commit
36d18c1368
|
@ -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)
|
||||
}
|
Loading…
Reference in New Issue