github.com/system-transparency/u-root@v6.0.1-0.20190919065413-ed07a650de4c+incompatible/cmds/core/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 }