qrz/vendor/github.com/gobuffalo/logger/terminal_check.go
Paul Lecuq 8505630433
Some checks failed
continuous-integration/drone/push Build is failing
updated dependencies
2021-08-30 19:45:06 +02:00

20 lines
233 B
Go

// +build !appengine
package logger
import (
"io"
"os"
"golang.org/x/term"
)
func checkIfTerminal(w io.Writer) bool {
switch v := w.(type) {
case *os.File:
return term.IsTerminal(int(v.Fd()))
default:
return false
}
}