From ffad6555d58677ea95eeebdc65cfaee77ccd922b Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Fri, 7 Jul 2023 11:34:57 -0400 Subject: [PATCH] chore(lint): add various nolint directives, where appropriate --- commands.go | 2 +- tty.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands.go b/commands.go index 7c30a12..3a0520d 100644 --- a/commands.go +++ b/commands.go @@ -13,7 +13,7 @@ import ( // return tea.Batch(someCommand, someOtherCommand) // } func Batch(cmds ...Cmd) Cmd { - var validCmds []Cmd + var validCmds []Cmd //nolint:prealloc for _, c := range cmds { if c == nil { continue diff --git a/tty.go b/tty.go index b804cf0..bd9717e 100644 --- a/tty.go +++ b/tty.go @@ -42,7 +42,7 @@ func (p *Program) restoreTerminalState() error { p.renderer.exitAltScreen() // give the terminal a moment to catch up - time.Sleep(time.Millisecond * 10) + time.Sleep(time.Millisecond * 10) //nolint:gomnd } } @@ -87,7 +87,7 @@ func (p *Program) readLoop() { func (p *Program) waitForReadLoop() { select { case <-p.readLoopDone: - case <-time.After(500 * time.Millisecond): + case <-time.After(500 * time.Millisecond): //nolint:gomnd // The read loop hangs, which means the input // cancelReader's cancel function has returned true even // though it was not able to cancel the read.