debian-forge-composer/vendor/github.com/sirupsen/logrus/terminal_check_unix.go
Diaa Sami 75372b98e1 logging: add logrus dependency
Just add the dependency and update relevant files
2021-09-30 18:34:05 +02:00

13 lines
231 B
Go

// +build linux aix zos
// +build !js
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
}