mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-09-16 09:16:26 +02:00
Remove return value of Alert/Confirm/Prompt
This might seem controversial; in many cases the client code gets longer, because it needs an extra line for an explicit `return nil`. I still prefer this, because it makes it clearer which calls can return errors.
This commit is contained in:
@@ -120,11 +120,11 @@ type IPopupHandler interface {
|
||||
// Shows a notification popup with the given title and message to the user.
|
||||
//
|
||||
// This is a convenience wrapper around Confirm(), thus the popup can be closed using both 'Enter' and 'ESC'.
|
||||
Alert(title string, message string) error
|
||||
Alert(title string, message string)
|
||||
// Shows a popup asking the user for confirmation.
|
||||
Confirm(opts ConfirmOpts) error
|
||||
Confirm(opts ConfirmOpts)
|
||||
// Shows a popup prompting the user for input.
|
||||
Prompt(opts PromptOpts) error
|
||||
Prompt(opts PromptOpts)
|
||||
WithWaitingStatus(message string, f func(gocui.Task) error) error
|
||||
WithWaitingStatusSync(message string, f func() error) error
|
||||
Menu(opts CreateMenuOptions) error
|
||||
|
Reference in New Issue
Block a user