initial commit

This commit is contained in:
konrad 2018-06-10 11:11:41 +02:00 committed by kolaente
commit 479cf54ada
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
595 changed files with 427508 additions and 0 deletions

18
vendor/github.com/mattn/go-isatty/isatty_bsd.go generated vendored Normal file
View file

@ -0,0 +1,18 @@
// +build darwin freebsd openbsd netbsd dragonfly
// +build !appengine
package isatty
import (
"syscall"
"unsafe"
)
const ioctlReadTermios = syscall.TIOCGETA
// IsTerminal return true if the file descriptor is terminal.
func IsTerminal(fd uintptr) bool {
var termios syscall.Termios
_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
return err == 0
}