-
Notifications
You must be signed in to change notification settings - Fork 852
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(SIGINT): better handle interrupts (#1255)
* feat(SIGINT): better handle interrupts This PR introduces `Interrupt()`, `InterruptMsg{}`, and `ErrInterrupted`. Users can still handle "ctrl+c" as before, but instead of return `tea.Quit`, they can return `tea.Interrupt`. Later on, they can `errors.If(err, tea.ErrInterrupted)` and `os.Exit(130)` if they want to. * chore: fix unrelated typo it was bothering me
- Loading branch information
Showing
3 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters