Make golint happy

This commit is contained in:
Christian Muehlhaeuser
2020-08-22 12:34:03 +02:00
parent 82e641ef63
commit d26cfb6b38
2 changed files with 2 additions and 4 deletions

4
key.go
View File

@@ -187,7 +187,7 @@ const (
KeyPgDown KeyPgDown
) )
// Mapping for control keys to friendly consts // Mapping for control keys to friendly consts:
var keyNames = map[int]string{ var keyNames = map[int]string{
keyNUL: "ctrl+@", // also ctrl+` keyNUL: "ctrl+@", // also ctrl+`
keySOH: "ctrl+a", keySOH: "ctrl+a",
@@ -272,7 +272,7 @@ var hexes = map[string]Key{
} }
// readInput reads keypress and mouse input from a TTY and returns a message // readInput reads keypress and mouse input from a TTY and returns a message
// containing information about the key or mouse event accordingly // containing information about the key or mouse event accordingly.
func readInput(r io.Reader) (Msg, error) { func readInput(r io.Reader) (Msg, error) {
var buf [256]byte var buf [256]byte

View File

@@ -116,7 +116,6 @@ func (r *renderer) flush() {
// Clear any lines we painted in the last render. // Clear any lines we painted in the last render.
if r.linesRendered > 0 { if r.linesRendered > 0 {
for i := r.linesRendered - 1; i > 0; i-- { for i := r.linesRendered - 1; i > 0; i-- {
// Check if we should skip rendering for this line. Clearing the // Check if we should skip rendering for this line. Clearing the
// line before painting is part of the standard rendering routine. // line before painting is part of the standard rendering routine.
if _, exists := r.ignoreLines[i]; !exists { if _, exists := r.ignoreLines[i]; !exists {
@@ -211,7 +210,6 @@ func (r *renderer) setIgnoredLines(from int, to int) {
moveCursor(out, r.linesRendered, 0) // put cursor back moveCursor(out, r.linesRendered, 0) // put cursor back
r.out.Write(out.Bytes()) r.out.Write(out.Bytes())
} }
} }
// clearIgnoredLines returns control of any ignored lines to the standard // clearIgnoredLines returns control of any ignored lines to the standard