1
0
mirror of https://github.com/Luzifer/tex-api.git synced 2024-09-20 10:02:55 +00:00
tex-api/vendor/github.com/Sirupsen/logrus/terminal_solaris.go
Knut Ahlers 3229ab442c
Add dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-03-06 00:18:57 +01: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
}