summaryrefslogtreecommitdiff
path: root/go/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go')
-rw-r--r--go/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/go/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/go/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
new file mode 100644
index 0000000..067047a
--- /dev/null
+++ b/go/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
@@ -0,0 +1,19 @@
+// +build !appengine,!gopherjs
+
+package logrus
+
+import (
+ "io"
+ "os"
+
+ "golang.org/x/crypto/ssh/terminal"
+)
+
+func checkIfTerminal(w io.Writer) bool {
+ switch v := w.(type) {
+ case *os.File:
+ return terminal.IsTerminal(int(v.Fd()))
+ default:
+ return false
+ }
+}