From 58c5e01d8c90f6788f0aaff7e2f133f6c0fb64ae Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 4 Apr 2023 13:18:50 +0200 Subject: [PATCH] chore: fix linter warnings --- nil_renderer.go | 2 +- tea.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nil_renderer.go b/nil_renderer.go index a022636..f5637aa 100644 --- a/nil_renderer.go +++ b/nil_renderer.go @@ -5,7 +5,7 @@ type nilRenderer struct{} func (n nilRenderer) start() {} func (n nilRenderer) stop() {} func (n nilRenderer) kill() {} -func (n nilRenderer) write(v string) {} +func (n nilRenderer) write(_ string) {} func (n nilRenderer) repaint() {} func (n nilRenderer) clearScreen() {} func (n nilRenderer) altScreen() bool { return false } diff --git a/tea.go b/tea.go index 9132fff..76c9b3b 100644 --- a/tea.go +++ b/tea.go @@ -314,6 +314,7 @@ func (p *Program) eventLoop(model Model, cmds chan Cmd) (Model, error) { if cmd == nil { continue } + msg := cmd() if batchMsg, ok := msg.(BatchMsg); ok { g, _ := errgroup.WithContext(p.ctx) @@ -324,12 +325,13 @@ func (p *Program) eventLoop(model Model, cmds chan Cmd) (Model, error) { return nil }) } + //nolint:errcheck g.Wait() // wait for all commands from batch msg to finish continue - } else { - p.Send(msg) } + + p.Send(msg) } }() }