Drop another dependency

This commit is contained in:
Kovid Goyal
2022-08-22 21:30:00 +05:30
parent cf287015de
commit eb4ee13f73
5 changed files with 9 additions and 7 deletions

View File

@@ -19,6 +19,12 @@ const (
TCSAFLUSH = 2
)
func IsTerminal(fd uintptr) bool {
var t unix.Termios
err := Tcgetattr(int(fd), &t)
return err == nil
}
type Term struct {
name string
fd int