Isatty tries to determine whether `fd` is a TTY.
(fd uintptr)
| 15 | |
| 16 | // Isatty tries to determine whether `fd` is a TTY. |
| 17 | func Isatty(fd uintptr) (bool, error) { |
| 18 | result, err := C.isatty(C.int(fd)) |
| 19 | if err != nil && err != syscall.EINVAL { |
| 20 | return false, err |
| 21 | } |
| 22 | return result != 0, nil |
| 23 | } |
no outgoing calls
no test coverage detected