aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/sirupsen/logrus/terminal_check_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/sirupsen/logrus/terminal_check_unix.go')
-rw-r--r--vendor/github.com/sirupsen/logrus/terminal_check_unix.go13
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 0000000..04748b8
--- /dev/null
+++ b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go
@@ -0,0 +1,13 @@
1// +build linux aix zos
2// +build !js
3
4package logrus
5
6import "golang.org/x/sys/unix"
7
8const ioctlReadTermios = unix.TCGETS
9
10func isTerminal(fd int) bool {
11 _, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
12 return err == nil
13}