summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui_common.go
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-04-14 20:06:25 +0200
committerStefan Haller <stefan@haller-berlin.de>2024-04-18 10:10:30 +0200
commit1869fda8006731ecc15b748028ce1b9742a4c756 (patch)
treef4f3793d6bcd55d14db39c6919c943b30a0848a6 /pkg/gui/gui_common.go
parent5396a706611220077d32d01058d5e4b025eab0de (diff)
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.
Diffstat (limited to 'pkg/gui/gui_common.go')
-rw-r--r--pkg/gui/gui_common.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/gui/gui_common.go b/pkg/gui/gui_common.go
index f45440312..a75aa3658 100644
--- a/pkg/gui/gui_common.go
+++ b/pkg/gui/gui_common.go
@@ -151,7 +151,7 @@ func (self *guiCommon) OnUIThread(f func() error) {
self.gui.onUIThread(f)
}
-func (self *guiCommon) OnWorker(f func(gocui.Task)) {
+func (self *guiCommon) OnWorker(f func(gocui.Task) error) {
self.gui.onWorker(f)
}