add dep management

This commit is contained in:
fengzhiqiang
2019-01-08 10:50:41 +08:00
parent c7810090da
commit 58ccc8c9a8
439 changed files with 235757 additions and 6 deletions
+19
View File
@@ -0,0 +1,19 @@
// +build !appengine,!js,!windows,!aix
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
}
}