mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
Make OnWorker callback return an error
This lets us get rid of a few more calls to Error(), and it simplifies things for clients of OnWorker: they can simply return an error from their callback like we do everywhere else.
This commit is contained in:
@ -13,8 +13,8 @@ func TestAsyncHandler(t *testing.T) {
|
||||
wg := sync.WaitGroup{}
|
||||
wg.Add(2)
|
||||
|
||||
onWorker := func(f func(gocui.Task)) {
|
||||
go f(gocui.NewFakeTask())
|
||||
onWorker := func(f func(gocui.Task) error) {
|
||||
go func() { _ = f(gocui.NewFakeTask()) }()
|
||||
}
|
||||
handler := NewAsyncHandler(onWorker)
|
||||
handler.onReject = func() {
|
||||
|
Reference in New Issue
Block a user