From 6fea16451a940eacc84b6a4071b4d18ab1c9e54e Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 12 May 2021 21:53:41 +0300 Subject: [PATCH] cli/input: ignore term.Restore errors, fix errcheck warnings I'm not sure we can do anything useful here. --- cli/input/input.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/input/input.go b/cli/input/input.go index fa61dee10..ee62a531a 100644 --- a/cli/input/input.go +++ b/cli/input/input.go @@ -25,7 +25,7 @@ func ReadLine(prompt string) (string, error) { if err != nil { panic(err) } - defer term.Restore(syscall.Stdin, s) + defer func() { _ = term.Restore(syscall.Stdin, s) }() trm = term.NewTerminal(ReadWriter{ Reader: os.Stdin, Writer: os.Stdout, @@ -50,7 +50,7 @@ func ReadPassword(prompt string) (string, error) { if err != nil { panic(err) } - defer term.Restore(syscall.Stdin, s) + defer func() { _ = term.Restore(syscall.Stdin, s) }() trm = term.NewTerminal(ReadWriter{os.Stdin, os.Stdout}, prompt) } return trm.ReadPassword(prompt)