github.com/sirupsen/logrus v1.2.0

This commit is contained in:
Jordan Liggitt
2019-04-05 13:35:02 -04:00
parent 65a6613fe2
commit 3cabb5e654
46 changed files with 1046 additions and 327 deletions

View File

@@ -0,0 +1,19 @@
// +build !appengine,!js,!windows
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
}
}