Error returns an error representing c and msg. If c is OK, returns nil.
(c codes.Code, msg string)
| 56 | |
| 57 | // Error returns an error representing c and msg. If c is OK, returns nil. |
| 58 | func Error(c codes.Code, msg string) error { |
| 59 | return New(c, msg).Err() |
| 60 | } |
| 61 | |
| 62 | // Errorf returns Error(c, fmt.Sprintf(format, a...)). |
| 63 | func Errorf(c codes.Code, format string, a ...any) error { |