mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
18 lines
219 B
Go
18 lines
219 B
Go
|
// +build !appengine,!js,!windows
|
||
|
|
||
|
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
|
||
|
}
|
||
|
}
|