diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-09 21:09:52 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-10 17:12:21 +1000 |
commit | 6b9390409eb533fe87648be55e9db7d36b1d9ee3 (patch) | |
tree | 43e35b86a17dbee8aac245cc93c2645727b61148 /pkg/gui/background.go | |
parent | 8964cedf27cbdb81f59e2400cfc89684d7458605 (diff) |
Use an interface for tasks instead of a concrete struct
By using an interface for tasks we can use a fake implementation in tests with extra methods
Diffstat (limited to 'pkg/gui/background.go')
-rw-r--r-- | pkg/gui/background.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/gui/background.go b/pkg/gui/background.go index 3417d67bf..d8976549f 100644 --- a/pkg/gui/background.go +++ b/pkg/gui/background.go @@ -86,7 +86,7 @@ func (self *BackgroundRoutineMgr) goEvery(interval time.Duration, stop chan stru if self.pauseBackgroundRefreshes { continue } - self.gui.c.OnWorker(func(*gocui.Task) { _ = function() }) + self.gui.c.OnWorker(func(gocui.Task) { _ = function() }) case <-stop: return } |