Use vendoring for backward compatibility
The switch of the Madon library to Go modules breaks builds with
Go version < 1.11 since the import path now contains "v2".
This patch adds vendoring so that it can still build with those
versions.
Let's try to re-enable Travis builds with Go v1.8-1.11...
// +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
}