1 // +build !appengine,!js,!windows,!aix 2 3 package logrus 4 5 import ( 6 "io" 7 "os" 8 9 "golang.org/x/crypto/ssh/terminal" 10 ) 11 12 func checkIfTerminal(w io.Writer) bool { 13 switch v := w.(type) { 14 case *os.File: 15 return terminal.IsTerminal(int(v.Fd())) 16 default: 17 return false 18 } 19 } 20