diff options
Diffstat (limited to 'vendor/github.com/sirupsen/logrus/terminal_check_unix.go')
-rw-r--r-- | vendor/github.com/sirupsen/logrus/terminal_check_unix.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go new file mode 100644 index 00000000..355dc966 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go @@ -0,0 +1,13 @@ +// +build linux aix + +package logrus + +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TCGETS + +func isTerminal(fd int) bool { + _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + return err == nil +} + |