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