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,20 @@
// +build !appengine,!js,windows
package logrus
import (
"io"
"os"
"syscall"
)
func checkIfTerminal(w io.Writer) bool {
switch v := w.(type) {
case *os.File:
var mode uint32
err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode)
return err == nil
default:
return false
}
}