diff options
Diffstat (limited to 'vendor/github.com/mattn')
-rw-r--r-- | vendor/github.com/mattn/go-colorable/go.mod | 2 | ||||
-rw-r--r-- | vendor/github.com/mattn/go-isatty/isatty_android.go | 23 | ||||
-rw-r--r-- | vendor/github.com/mattn/go-isatty/isatty_others.go | 2 | ||||
-rw-r--r-- | vendor/github.com/mattn/go-isatty/isatty_tcgets.go (renamed from vendor/github.com/mattn/go-isatty/isatty_linux.go) | 3 |
4 files changed, 27 insertions, 3 deletions
diff --git a/vendor/github.com/mattn/go-colorable/go.mod b/vendor/github.com/mattn/go-colorable/go.mod index 9d9f4248..ef3ca9d4 100644 --- a/vendor/github.com/mattn/go-colorable/go.mod +++ b/vendor/github.com/mattn/go-colorable/go.mod @@ -1,3 +1,3 @@ module github.com/mattn/go-colorable -require github.com/mattn/go-isatty v0.0.5 +require github.com/mattn/go-isatty v0.0.8 diff --git a/vendor/github.com/mattn/go-isatty/isatty_android.go b/vendor/github.com/mattn/go-isatty/isatty_android.go new file mode 100644 index 00000000..d3567cb5 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_android.go @@ -0,0 +1,23 @@ +// +build android + +package isatty + +import ( + "syscall" + "unsafe" +) + +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 +} + +// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +} diff --git a/vendor/github.com/mattn/go-isatty/isatty_others.go b/vendor/github.com/mattn/go-isatty/isatty_others.go index f02849c5..ff714a37 100644 --- a/vendor/github.com/mattn/go-isatty/isatty_others.go +++ b/vendor/github.com/mattn/go-isatty/isatty_others.go @@ -1,4 +1,4 @@ -// +build appengine js +// +build appengine js nacl package isatty diff --git a/vendor/github.com/mattn/go-isatty/isatty_linux.go b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go index e004038e..453b025d 100644 --- a/vendor/github.com/mattn/go-isatty/isatty_linux.go +++ b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go @@ -1,5 +1,6 @@ -// +build linux +// +build linux aix // +build !appengine +// +build !android package isatty |