Add option to panic in test.NewNullLogger to allow testing of

calls to `Fatal*`

See #813
This commit is contained in:
Albert Salim
2018-10-06 18:08:19 +08:00
parent 1ed61965b9
commit 2be620216a
5 changed files with 35 additions and 7 deletions
+2
View File
@@ -45,6 +45,8 @@ func runHandlers() {
}
}
type exitFunc func(int)
// Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code)
func Exit(code int) {
runHandlers()