From 4f63f283c47dcf9e705ce5b8e8857f2b42cff8ad Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 4 Apr 2020 03:29:12 +0800 Subject: Rename scripts to build and add revive command as a new build tool command (#10942) Co-authored-by: techknowlogick --- vendor/github.com/mattn/go-isatty/isatty_tcgets.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 vendor/github.com/mattn/go-isatty/isatty_tcgets.go (limited to 'vendor/github.com/mattn/go-isatty/isatty_tcgets.go') diff --git a/vendor/github.com/mattn/go-isatty/isatty_tcgets.go b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go new file mode 100644 index 0000000000..453b025d0d --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go @@ -0,0 +1,19 @@ +// +build linux aix +// +build !appengine +// +build !android + +package isatty + +import "golang.org/x/sys/unix" + +// IsTerminal return true if the file descriptor is terminal. +func IsTerminal(fd uintptr) bool { + _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) + return err == nil +} + +// 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 +} -- cgit v1.2.3