Move files to main directory

This commit is contained in:
Andrey Tcherepanov
2019-04-01 10:15:09 -06:00
parent a6c0064cfa
commit 3e06420226
2 changed files with 0 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
// +build darwin dragonfly freebsd netbsd openbsd
package terminal
import "golang.org/x/sys/unix"
const ioctlReadTermios = unix.TIOCGETA
func IsTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
}