IsAssertionFailure returns true if the error (not its causes) is an assertion failure annotation. Consider using markers.If or HasAssertionFailure to test both the error and its causes.
(err error)
| 52 | // assertion failure annotation. Consider using markers.If or |
| 53 | // HasAssertionFailure to test both the error and its causes. |
| 54 | func IsAssertionFailure(err error) bool { |
| 55 | _, ok := err.(*withAssertionFailure) |
| 56 | return ok |
| 57 | } |
| 58 | |
| 59 | type withAssertionFailure struct { |
| 60 | cause error |
no outgoing calls
searching dependent graphs…