vendor gotest.tools/gotestsum

This commit is contained in:
Jordan Liggitt
2019-07-31 15:23:52 -04:00
parent 93c02e164f
commit bd2dc5e5a2
81 changed files with 5469 additions and 698 deletions

View File

@@ -0,0 +1,19 @@
// +build linux
// +build ppc64 ppc64le
package isatty
import (
"unsafe"
syscall "golang.org/x/sys/unix"
)
const ioctlReadTermios = syscall.TCGETS
// 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
}