This commit is contained in:
b612 committed 2021-07-07 11:42:33 +08:00
1 parent 00cc2eaa21
commit 0e91e97132
1 file changed
+2
+2
View File
@@ -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)