open-vault/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
Jeff Mitchell 98b479ab58 Bump deps
2018-01-26 18:51:00 -05:00

20 lines
252 B
Go

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