
(*) github.com/Microsoft/hcsshim (*) golang.org/x/sys (*) github.com/x/cyrpto (*) github.com/sirupsen/logrus (*) github.com/Microsoft/go-winio (*) github.com/juju/errors (*) github.com/buger/jsonparser
20 lines
262 B
Go
20 lines
262 B
Go
// +build !appengine,!gopherjs
|
|
|
|
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
|
|
}
|
|
}
|