Explicitly ignore io.Writer return values in renderer

This commit is contained in:
Christian Rocha 2020-09-28 16:28:40 -04:00
parent fb48e03639
commit 591fcabdd4
No known key found for this signature in database
GPG Key ID: D6CC7A16E5878018
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@ package tea
import "errors"
// MouseMsg contains information about a mouse event.
type MouseMsg MouseEvent
// MouseEvent represents a mouse event, which could be a click, a scroll wheel

View File

@ -208,7 +208,7 @@ func (r *renderer) setIgnoredLines(from int, to int) {
cursorUp(out)
}
moveCursor(out, r.linesRendered, 0) // put cursor back
r.out.Write(out.Bytes())
_, _ = r.out.Write(out.Bytes())
}
}
@ -252,7 +252,7 @@ func (r *renderer) insertTop(lines []string, topBoundary, bottomBoundary int) {
// Move cursor back to where the main rendering routine expects it to be
moveCursor(b, r.linesRendered, 0)
r.out.Write(b.Bytes())
_, _ = r.out.Write(b.Bytes())
}
// insertBottom effectively scrolls down. It inserts lines at the bottom of
@ -278,7 +278,7 @@ func (r *renderer) insertBottom(lines []string, topBoundary, bottomBoundary int)
// Move cursor back to where the main rendering routine expects it to be
moveCursor(b, r.linesRendered, 0)
r.out.Write(b.Bytes())
_, _ = r.out.Write(b.Bytes())
}
// handleMessages handles internal messages for the renderer.