feature (errors): add support fmt specifier with operands to WithMsg(...) (#2126)
This commit is contained in:
3 files changed
+13
-3
No files matched your search
@@ -74,7 +74,7 @@ func E(ctx context.Context, opt ...Option) error {
|
||||
Code: code,
|
||||
Op: opts.withOp,
|
||||
Wrapped: opts.withErrWrapped,
|
||||
Msg: opts.withErrMsg,
|
||||
Msg: fmt.Sprintf(opts.withErrMsg, opts.withErrMsgArgs...),
|
||||
}
|
||||
if opts.withoutEvent {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user