IsCanceled returns whether the givenerror is context.Canceled or of type Canceled.
(err error)
| 77 | |
| 78 | // IsCanceled returns whether the givenerror is context.Canceled or of type Canceled. |
| 79 | func IsCanceled(err error) bool { |
| 80 | return HasCode(err, uint32(codes.Canceled)) |
| 81 | } |
| 82 | |
| 83 | // IsUnknown returns whether the given error is of type Unknown. |
| 84 | func IsUnknown(err error) bool { return HasCode(err, uint32(codes.Unknown)) } |