orbiter/vendor/github.com/Sirupsen/logrus/terminal_solaris.go
Gianluca Arbezzano 495ea07d84
Updated dep version and dependencies
Dep recently released Alpha version. In this version lock and json GoPgk
are not going to change drastically.
2017-07-10 10:33:29 +02:00

16 lines
273 B
Go

// +build solaris,!appengine
package logrus
import (
"os"
"golang.org/x/sys/unix"
)
// IsTerminal returns true if the given file descriptor is a terminal.
func IsTerminal() bool {
_, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA)
return err == nil
}