lazydocker/vendor/github.com/sirupsen/logrus/terminal_check_unix.go
Sebastiaan van Stijn 6217ba0808
go.mod: github.com/sirupsen/logrus v1.9.3
update to the current version, which addresses some issues with current
Go versions, and removes the legacy konsorten/go-windows-terminal-sequences
dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-15 11:02:02 +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
}