Files
plugin-drone-rancher/vendor/github.com/Sirupsen/logrus/terminal_solaris.go
T
Joachim Hill-Grannec aff3124306 moved cli from codegangsta to urfave
added the badges to readme
moved to govendor for vendoring
2017-09-01 11:30:00 -04:00

16 lines
262 B
Go
Executable File

// +build solaris
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
}