Errorf is a helper function to create an Error with given code and formatted message.
(code Code, format string, args ...any)
| 102 | |
| 103 | // Errorf is a helper function to create an Error with given code and formatted message. |
| 104 | func Errorf(code Code, format string, args ...any) *Error { |
| 105 | return &Error{ |
| 106 | Code: code, |
| 107 | Err: pkgerrors.Errorf(format, args...), |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | // Wrap is a helper function to wrap an Error with given code. |
| 112 | func Wrap(err error, code Code) *Error { |
no test coverage detected