first (BIG) commit

This commit is contained in:
Julien Neuhart
2018-03-28 20:23:32 +02:00
commit 707927c126
344 changed files with 170912 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
// +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
}
}