Check errors and enable errcheck in lint config (#2242)

This commit is contained in:
Carlo Teubner authored and GitHub committed 2025-11-10 10:17:18 +01:00
1 parent b6535060a6
commit 8da478bb86
11 files changed
+120 -48

No files matched your search

+8 -2
View File
@@ -1820,10 +1820,16 @@ func anyKey() {
if err != nil {
panic(err)
}
defer term.Restore(int(os.Stdin.Fd()), oldState)
defer func() {
if err := term.Restore(int(os.Stdin.Fd()), oldState); err != nil {
panic(err)
}
}()
b := make([]byte, 8)
os.Stdin.Read(b)
if _, err := os.Stdin.Read(b); err != nil {
log.Printf("Failed to read key press: %s", err)
}
}
func listMatches(screen tcell.Screen, matches []compMatch, selectedInd int) (string, *menuSelect) {