diff options
author | baude <bbaude@redhat.com> | 2019-09-17 12:58:08 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-09-17 13:02:05 -0500 |
commit | 71399a972c12fb3adeac8990ba2ba0afbd5ae3bc (patch) | |
tree | d2d1249d4f98611022141b335e988acd794aa2c9 /vendor/github.com/sirupsen/logrus/terminal_check_unix.go | |
parent | 0fae0bb06923ce3b2b6b7900dc00cfaaad3838fd (diff) |
origin dnsname commit
Signed-off-by: baude <bbaude@redhat.com>
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 0000000..355dc96 --- /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 +} + |