aboutsummaryrefslogtreecommitdiffstats
path: root/src/dma/vendor/github.com/mattn/go-isatty
diff options
context:
space:
mode:
Diffstat (limited to 'src/dma/vendor/github.com/mattn/go-isatty')
-rw-r--r--src/dma/vendor/github.com/mattn/go-isatty/.travis.yml4
-rw-r--r--src/dma/vendor/github.com/mattn/go-isatty/go.mod3
-rw-r--r--src/dma/vendor/github.com/mattn/go-isatty/go.sum2
-rw-r--r--src/dma/vendor/github.com/mattn/go-isatty/isatty_android.go (renamed from src/dma/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go)12
-rw-r--r--src/dma/vendor/github.com/mattn/go-isatty/isatty_appengine.go15
-rw-r--r--src/dma/vendor/github.com/mattn/go-isatty/isatty_bsd.go6
-rw-r--r--src/dma/vendor/github.com/mattn/go-isatty/isatty_linux.go21
-rw-r--r--src/dma/vendor/github.com/mattn/go-isatty/isatty_others.go9
-rw-r--r--src/dma/vendor/github.com/mattn/go-isatty/isatty_solaris.go6
9 files changed, 47 insertions, 31 deletions
diff --git a/src/dma/vendor/github.com/mattn/go-isatty/.travis.yml b/src/dma/vendor/github.com/mattn/go-isatty/.travis.yml
index b9f8b239..5597e026 100644
--- a/src/dma/vendor/github.com/mattn/go-isatty/.travis.yml
+++ b/src/dma/vendor/github.com/mattn/go-isatty/.travis.yml
@@ -2,6 +2,10 @@ language: go
go:
- tip
+os:
+ - linux
+ - osx
+
before_install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
diff --git a/src/dma/vendor/github.com/mattn/go-isatty/go.mod b/src/dma/vendor/github.com/mattn/go-isatty/go.mod
new file mode 100644
index 00000000..f310320c
--- /dev/null
+++ b/src/dma/vendor/github.com/mattn/go-isatty/go.mod
@@ -0,0 +1,3 @@
+module github.com/mattn/go-isatty
+
+require golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223
diff --git a/src/dma/vendor/github.com/mattn/go-isatty/go.sum b/src/dma/vendor/github.com/mattn/go-isatty/go.sum
new file mode 100644
index 00000000..426c8973
--- /dev/null
+++ b/src/dma/vendor/github.com/mattn/go-isatty/go.sum
@@ -0,0 +1,2 @@
+golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
+golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_android.go
index 44e5d213..d3567cb5 100644
--- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go
+++ b/src/dma/vendor/github.com/mattn/go-isatty/isatty_android.go
@@ -1,12 +1,10 @@
-// +build linux
-// +build ppc64 ppc64le
+// +build android
package isatty
import (
+ "syscall"
"unsafe"
-
- syscall "golang.org/x/sys/unix"
)
const ioctlReadTermios = syscall.TCGETS
@@ -17,3 +15,9 @@ func IsTerminal(fd uintptr) bool {
_, _, 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/src/dma/vendor/github.com/mattn/go-isatty/isatty_appengine.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_appengine.go
deleted file mode 100644
index 9584a988..00000000
--- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_appengine.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// +build appengine
-
-package isatty
-
-// IsTerminal returns true if the file descriptor is terminal which
-// is always false on on appengine classic which is a sandboxed PaaS.
-func IsTerminal(fd uintptr) bool {
- return false
-}
-
-// 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/src/dma/vendor/github.com/mattn/go-isatty/isatty_bsd.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_bsd.go
index 42f2514d..07e93039 100644
--- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_bsd.go
+++ b/src/dma/vendor/github.com/mattn/go-isatty/isatty_bsd.go
@@ -16,3 +16,9 @@ func IsTerminal(fd uintptr) bool {
_, _, 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/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux.go
index 7384cf99..4f8af465 100644
--- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux.go
+++ b/src/dma/vendor/github.com/mattn/go-isatty/isatty_linux.go
@@ -1,18 +1,19 @@
// +build linux
-// +build !appengine,!ppc64,!ppc64le
+// +build !appengine
+// +build !android
package isatty
-import (
- "syscall"
- "unsafe"
-)
-
-const ioctlReadTermios = syscall.TCGETS
+import "golang.org/x/sys/unix"
// 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
+ _, 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
}
diff --git a/src/dma/vendor/github.com/mattn/go-isatty/isatty_others.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_others.go
index ff4de3d9..f02849c5 100644
--- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_others.go
+++ b/src/dma/vendor/github.com/mattn/go-isatty/isatty_others.go
@@ -1,8 +1,13 @@
-// +build !windows
-// +build !appengine
+// +build appengine js
package isatty
+// IsTerminal returns true if the file descriptor is terminal which
+// is always false on js and appengine classic which is a sandboxed PaaS.
+func IsTerminal(fd uintptr) bool {
+ return false
+}
+
// 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 {
diff --git a/src/dma/vendor/github.com/mattn/go-isatty/isatty_solaris.go b/src/dma/vendor/github.com/mattn/go-isatty/isatty_solaris.go
index 1f0c6bf5..bdd5c79a 100644
--- a/src/dma/vendor/github.com/mattn/go-isatty/isatty_solaris.go
+++ b/src/dma/vendor/github.com/mattn/go-isatty/isatty_solaris.go
@@ -14,3 +14,9 @@ func IsTerminal(fd uintptr) bool {
err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio)
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
+}