1
0
Fork 0
mirror of https://github.com/vbatts/imgsrv.git synced 2025-07-20 22:50:27 +00:00

vendoring sources, for posterity sake

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2019-03-11 15:31:42 -04:00
parent e06074e25a
commit 3c732c3b43
Signed by: vbatts
GPG key ID: 10937E57733F1362
416 changed files with 248911 additions and 2 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
}
}