Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove deprecated internal func #1137

Merged
merged 1 commit into from Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions internal/exit/exit.go
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion internal/exit/exit_test.go
Expand Up @@ -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{}},
}

Expand Down
2 changes: 1 addition & 1 deletion zapcore/entry.go
Expand Up @@ -197,7 +197,7 @@ func (a CheckWriteAction) OnWrite(ce *CheckedEntry, _ []Field) {
case WriteThenPanic:
panic(ce.Message)
case WriteThenFatal:
exit.Exit()
exit.With(1)
}
}

Expand Down