mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
chore(lint): add various nolint directives, where appropriate
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
|||||||
// return tea.Batch(someCommand, someOtherCommand)
|
// return tea.Batch(someCommand, someOtherCommand)
|
||||||
// }
|
// }
|
||||||
func Batch(cmds ...Cmd) Cmd {
|
func Batch(cmds ...Cmd) Cmd {
|
||||||
var validCmds []Cmd
|
var validCmds []Cmd //nolint:prealloc
|
||||||
for _, c := range cmds {
|
for _, c := range cmds {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
continue
|
continue
|
||||||
|
|||||||
4
tty.go
4
tty.go
@@ -42,7 +42,7 @@ func (p *Program) restoreTerminalState() error {
|
|||||||
p.renderer.exitAltScreen()
|
p.renderer.exitAltScreen()
|
||||||
|
|
||||||
// give the terminal a moment to catch up
|
// 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() {
|
func (p *Program) waitForReadLoop() {
|
||||||
select {
|
select {
|
||||||
case <-p.readLoopDone:
|
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
|
// The read loop hangs, which means the input
|
||||||
// cancelReader's cancel function has returned true even
|
// cancelReader's cancel function has returned true even
|
||||||
// though it was not able to cancel the read.
|
// though it was not able to cancel the read.
|
||||||
|
|||||||
Reference in New Issue
Block a user