Skip to content

Commit f412589

Browse files
authored
fix message formatting (#13)
1 parent 1e47c06 commit f412589

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

err.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func New(code std.Code, msg string, data ...interface{}) *Err {
2929
err: fmt.Errorf(msg, data...),
3030
caller: getCaller(),
3131
code: code,
32-
msg: msg,
32+
msg: fmt.Sprintf(msg, data...),
3333
trace: getTrace(),
3434
}},
3535
mux: &sync.Mutex{},
@@ -383,7 +383,7 @@ func Wrap(err error, code std.Code, msg string, data ...interface{}) *Err {
383383
err: fmt.Errorf(msg, data...),
384384
caller: getCaller(),
385385
code: code,
386-
msg: msg,
386+
msg: fmt.Sprintf(msg, data...),
387387
})
388388

389389
return errs

0 commit comments

Comments
 (0)