Die prints an error message and immediately exits the application. If PanicOnDie is set to true a panic will occur instead of os.Exit being called.
(msg string, args ...interface{})
| 118 | // If PanicOnDie is set to true a panic will occur instead of os.Exit being |
| 119 | // called. |
| 120 | func (m *Messenger) Die(msg string, args ...interface{}) { |
| 121 | m.Err(msg, args...) |
| 122 | if m.PanicOnDie { |
| 123 | panic("trapped a Die() call") |
| 124 | } |
| 125 | os.Exit(m.ecode) |
| 126 | } |
| 127 | |
| 128 | // Die prints an error message and immediately exits the application using the |
| 129 | // Default Messenger. If PanicOnDie is set to true a panic will occur instead of |
no test coverage detected