cli/input: ignore term.Restore errors, fix errcheck warnings
I'm not sure we can do anything useful here.
This commit is contained in:
parent
b1710bebaa
commit
6fea16451a
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue