chore: fix linter warnings

This commit is contained in:
Christian Muehlhaeuser
2023-04-04 13:18:50 +02:00
parent 273f59bd11
commit 58c5e01d8c
2 changed files with 5 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ type nilRenderer struct{}
func (n nilRenderer) start() {} func (n nilRenderer) start() {}
func (n nilRenderer) stop() {} func (n nilRenderer) stop() {}
func (n nilRenderer) kill() {} func (n nilRenderer) kill() {}
func (n nilRenderer) write(v string) {} func (n nilRenderer) write(_ string) {}
func (n nilRenderer) repaint() {} func (n nilRenderer) repaint() {}
func (n nilRenderer) clearScreen() {} func (n nilRenderer) clearScreen() {}
func (n nilRenderer) altScreen() bool { return false } func (n nilRenderer) altScreen() bool { return false }

6
tea.go
View File

@@ -314,6 +314,7 @@ func (p *Program) eventLoop(model Model, cmds chan Cmd) (Model, error) {
if cmd == nil { if cmd == nil {
continue continue
} }
msg := cmd() msg := cmd()
if batchMsg, ok := msg.(BatchMsg); ok { if batchMsg, ok := msg.(BatchMsg); ok {
g, _ := errgroup.WithContext(p.ctx) g, _ := errgroup.WithContext(p.ctx)
@@ -324,12 +325,13 @@ func (p *Program) eventLoop(model Model, cmds chan Cmd) (Model, error) {
return nil return nil
}) })
} }
//nolint:errcheck //nolint:errcheck
g.Wait() // wait for all commands from batch msg to finish g.Wait() // wait for all commands from batch msg to finish
continue continue
} else {
p.Send(msg)
} }
p.Send(msg)
} }
}() }()
} }