1 //go:build (linux || aix || zos) && !appengine && !tinygo 2 // +build linux aix zos 3 // +build !appengine 4 // +build !tinygo 5 6 package isatty 7 8 import "golang.org/x/sys/unix" 9 10 // IsTerminal return true if the file descriptor is terminal. 11 func IsTerminal(fd uintptr) bool { 12 _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 13 return err == nil 14 } 15 16 // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 17 // terminal. This is also always false on this environment. 18 func IsCygwinTerminal(fd uintptr) bool { 19 return false 20 } 21