terminal_check_notappengine.go 232 B

1234567891011121314151617
  1. // +build !appengine,!js,!windows,!nacl,!plan9
  2. package logrus
  3. import (
  4. "io"
  5. "os"
  6. )
  7. func checkIfTerminal(w io.Writer) bool {
  8. switch v := w.(type) {
  9. case *os.File:
  10. return isTerminal(int(v.Fd()))
  11. default:
  12. return false
  13. }
  14. }