Safe will close tcell if a panic occurs so that we don't end up in a malformed terminal state
(f func())
| 66 | // Safe will close tcell if a panic occurs so that we don't end up in a malformed |
| 67 | // terminal state |
| 68 | func Safe(f func()) { |
| 69 | _ = SafeWithError(func() error { f(); return nil }) |
| 70 | } |
| 71 | |
| 72 | func SafeWithError(f func() error) error { |
| 73 | panicking := true |
no test coverage detected