master
兔子 4 years ago
parent 00cc2eaa21
commit 0e91e97132

@ -3,6 +3,8 @@
package isatty
import "golang.org/x/sys/unix"
// IsTerminal return true if the file descriptor is terminal.
func IsTerminal(fd uintptr) bool {
_, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA)

Loading…
Cancel
Save