Browse Source

remove isatty_others

Marcelo Pires 7 năm trước cách đây
mục cha
commit
0cbfc10b1b
5 tập tin đã thay đổi với 24 bổ sung11 xóa
  1. 6 0
      isatty_bsd.go
  2. 6 0
      isatty_linux.go
  3. 6 0
      isatty_linux_ppc64x.go
  4. 0 11
      isatty_others.go
  5. 6 0
      isatty_solaris.go

+ 6 - 0
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
+}

+ 6 - 0
isatty_linux.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
+}

+ 6 - 0
isatty_linux_ppc64x.go

@@ -17,3 +17,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
+}

+ 0 - 11
isatty_others.go

@@ -1,11 +0,0 @@
-// +build !windows
-// +build !appengine
-// +build !js
-
-package isatty
-
-// 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
-}

+ 6 - 0
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
+}