summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-02-20 23:41:09 +0100
committerWim <wim@42.be>2018-02-20 23:41:09 +0100
commit6ea368c383ccc19678623c51d8e4ecbbdb0a64ac (patch)
tree0ccce9d453a743c59abf58eb510ccab99128e381 /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
parente92b6de09fd9d983deea17113b28aaba14863735 (diff)
downloadmatterbridge-msglm-6ea368c383ccc19678623c51d8e4ecbbdb0a64ac.tar.gz
matterbridge-msglm-6ea368c383ccc19678623c51d8e4ecbbdb0a64ac.tar.bz2
matterbridge-msglm-6ea368c383ccc19678623c51d8e4ecbbdb0a64ac.zip
Move Sirupsen => sirupsen
Diffstat (limited to 'vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go')
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
new file mode 100644
index 00000000..116bcb4e
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
@@ -0,0 +1,19 @@
+// +build !appengine
+
+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
+ }
+}