etcd/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
Gyuho Lee 31c7d0139c vendor: upgrade "sirupsen/logrus"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-13 10:10:09 -07:00

20 lines
262 B
Go

// +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
}
}