reg/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
Jess Frazelle bacc2de371
update deps
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-05-11 15:33:30 -04: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
}
}