mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-25 22:32:13 +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:
@@ -13,7 +13,7 @@ func NewBisectHelper(c *HelperCommon) *BisectHelper {
|
||||
}
|
||||
|
||||
func (self *BisectHelper) Reset() error {
|
||||
return self.c.Confirm(types.ConfirmOpts{
|
||||
self.c.Confirm(types.ConfirmOpts{
|
||||
Title: self.c.Tr.Bisect.ResetTitle,
|
||||
Prompt: self.c.Tr.Bisect.ResetPrompt,
|
||||
HandleConfirm: func() error {
|
||||
@@ -25,6 +25,8 @@ func (self *BisectHelper) Reset() error {
|
||||
return self.PostBisectCommandRefresh()
|
||||
},
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *BisectHelper) PostBisectCommandRefresh() error {
|
||||
|
||||
Reference in New Issue
Block a user