Merge pull request #4622 from MichaelEischer/fix-outdated-windows-import

termstatus: update import path of golang.org/x/term
This commit is contained in:
Michael Eischer 2024-01-06 23:24:16 +01:00 committed by GitHub
commit 0360e540af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,8 +9,8 @@ import (
"syscall"
"unsafe"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/sys/windows"
"golang.org/x/term"
)
// clearCurrentLine removes all characters from the current line and resets the
@ -74,7 +74,7 @@ func windowsMoveCursorUp(_ io.Writer, fd uintptr, n int) {
// isWindowsTerminal return true if the file descriptor is a windows terminal (cmd, psh).
func isWindowsTerminal(fd uintptr) bool {
return terminal.IsTerminal(int(fd))
return term.IsTerminal(int(fd))
}
func isPipe(fd uintptr) bool {