@@ -0,0 +1,15 @@
+package main
+
+import (
+ "fmt"
+ "github.com/mattn/go-isatty"
+ "os"
+)
+func main() {
+ if isatty.IsTerminal(int(os.Stdout.Fd())) {
+ fmt.Println("Is Terminal")
+ } else {
+ fmt.Println("Is Not Terminal")
+ }
+}
@@ -0,0 +1,9 @@
+// +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
@@ -1,4 +1,5 @@
// +build darwin freebsd openbsd netbsd
+// +build !appengine
package isatty
// +build linux
// +build solaris
// +build windows