switch to golang.org/x/term

This commit is contained in:
Michael Eischer
2022-03-28 22:24:15 +02:00
parent c60540b196
commit 61e179ee78
4 changed files with 13 additions and 12 deletions

View File

@@ -7,7 +7,7 @@ import (
"io"
"os"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"
)
// clearCurrentLine removes all characters from the current line and resets the
@@ -24,7 +24,7 @@ func moveCursorUp(wr io.Writer, fd uintptr) func(io.Writer, uintptr, int) {
// CanUpdateStatus returns true if status lines can be printed, the process
// output is not redirected to a file or pipe.
func CanUpdateStatus(fd uintptr) bool {
if !terminal.IsTerminal(int(fd)) {
if !term.IsTerminal(int(fd)) {
return false
}
term := os.Getenv("TERM")