From 9e5d3863048e56cc27b4cee6205a1462642e6a90 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sat, 19 Dec 2020 17:56:27 +0300 Subject: [PATCH] golint --- ui.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui.go b/ui.go index c1b5727..d58f307 100644 --- a/ui.go +++ b/ui.go @@ -1119,14 +1119,13 @@ func listMatchesMenu(ui *ui, matches []string) error { ncol := wtot / wcol - bytesWrote := 0 - - if n, err := b.WriteString("possible matches\n"); err != nil { + n, err := b.WriteString("possible matches\n") + if err != nil { return err - } else { - bytesWrote += n } + bytesWrote := n + for i := 0; i < len(matches); { for j := 0; j < ncol && i < len(matches); i, j = i+1, j+1 { target := matches[i]