Fatalf is equivalent to Logf followed by FailNow.
(format string, args ...any)
| 50 | |
| 51 | // Fatalf is equivalent to Logf followed by FailNow. |
| 52 | func (p *RecoverableT) Fatalf(format string, args ...any) { |
| 53 | p.Errorf(format, args...) |
| 54 | p.FailNow() |
| 55 | } |
| 56 | |
| 57 | // Recover catches the panic from FailNow. It must be called as a deferred function. |
| 58 | // Any non-sentinel panic is re-raised. When a test failure is caught, the enclosing |