Files
logrus/terminal_check_notappengine.go
T
Christian Stewart eed1c0f832 Fix GopherJS build tags
The GopherJS build tag is "js" not "gopherjs"

Signed-off-by: Christian Stewart <christian@paral.in>
2018-06-20 21:39:23 -07:00

20 lines
256 B
Go

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