Initial commit

This commit is contained in:
Stash Dev
2019-02-09 04:30:49 -08:00
commit 87eeed7e71
1093 changed files with 558731 additions and 0 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
}
}