containerd/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
Sebastiaan van Stijn ea182aec8a
vendor: sirupsen/logrus v1.5.0
full diff: https://github.com/sirupsen/logrus/compare/v1.4.1...v1.5.0

- Ability to DisableHTMLEscape when using the JSON formatter
- Support/fixes for go 1.14
- Many many bugfixes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-29 12:21:43 +02:00

18 lines
232 B
Go

// +build !appengine,!js,!windows,!nacl,!plan9
package logrus
import (
"io"
"os"
)
func checkIfTerminal(w io.Writer) bool {
switch v := w.(type) {
case *os.File:
return isTerminal(int(v.Fd()))
default:
return false
}
}