diff --git a/internal/exit/exit.go b/internal/exit/exit.go index 187fe5bfe..f673f9947 100644 --- a/internal/exit/exit.go +++ b/internal/exit/exit.go @@ -26,13 +26,6 @@ import "os" var _exit = os.Exit -// Exit normally terminates the process by calling os.Exit(1). If the package -// is stubbed, it instead records a call in the testing spy. -// Deprecated: use With() instead. -func Exit() { - With(1) -} - // With terminates the process by calling os.Exit(code). If the package is // stubbed, it instead records a call in the testing spy. func With(code int) { diff --git a/internal/exit/exit_test.go b/internal/exit/exit_test.go index 0f86a8844..229958472 100644 --- a/internal/exit/exit_test.go +++ b/internal/exit/exit_test.go @@ -37,7 +37,6 @@ func TestStub(t *testing.T) { want want }{ {func() { exit.With(42) }, want{exit: true, code: 42}}, - {exit.Exit, want{exit: true, code: 1}}, {func() {}, want{}}, } diff --git a/zapcore/entry.go b/zapcore/entry.go index 216a86d93..76eea2822 100644 --- a/zapcore/entry.go +++ b/zapcore/entry.go @@ -197,7 +197,7 @@ func (a CheckWriteAction) OnWrite(ce *CheckedEntry, _ []Field) { case WriteThenPanic: panic(ce.Message) case WriteThenFatal: - exit.Exit() + exit.With(1) } }