Is returns whether the given error is of the same type.
(target error)
| 42 | |
| 43 | // Is returns whether the given error is of the same type. |
| 44 | func (e *Error) Is(target error) bool { |
| 45 | if e == nil || target == nil { |
| 46 | return false |
| 47 | } |
| 48 | |
| 49 | t, ok := target.(*Error) //nolint:errorlint // Error implementation, not usage. |
| 50 | if !ok { |
| 51 | return false |
| 52 | } |
| 53 | return e.id == t.id |
| 54 | } |
| 55 | |
| 56 | // Unwrap returns the wrapped error. |
| 57 | func (e *Error) Unwrap() error { |
no outgoing calls