1
0
mirror of https://github.com/Luzifer/repo-template.git synced 2024-09-20 17:42:58 +00:00
repo-template/vendor/github.com/sirupsen/logrus/terminal_check_unix.go
Knut Ahlers afd68ccae4
Update vendored dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-04-15 20:42:26 +02:00

14 lines
214 B
Go

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