github.com/mem/u-root@v2.0.1-0.20181004165302-9b18b4636a33+incompatible/cmds/elvish/sys/isatty_windows.go (about) 1 // +build windows 2 3 package sys 4 5 import ( 6 "os" 7 8 "github.com/mattn/go-isatty" 9 ) 10 11 // IsATTY returns true if the given file descriptor is a terminal. 12 func IsATTY(file *os.File) bool { 13 fd := uintptr(file.Fd()) 14 return isatty.IsTerminal(fd) || isatty.IsCygwinTerminal(fd) 15 }