blob: 3293fb3caad45066b0a5c736eb5c492bbbbd710b [file] [log] [blame]
khenaidood948f772021-08-11 17:49:24 -04001// +build !appengine,!js,!windows,!nacl,!plan9
khenaidooab1f7bd2019-11-14 14:00:27 -05002
3package logrus
4
5import (
6 "io"
7 "os"
khenaidooab1f7bd2019-11-14 14:00:27 -05008)
9
10func checkIfTerminal(w io.Writer) bool {
11 switch v := w.(type) {
12 case *os.File:
khenaidood948f772021-08-11 17:49:24 -040013 return isTerminal(int(v.Fd()))
khenaidooab1f7bd2019-11-14 14:00:27 -050014 default:
15 return false
16 }
17}