1
0
mirror of https://github.com/rancher/norman.git synced 2025-10-22 09:28:45 +00:00
Files
norman/vendor/github.com/sirupsen/logrus/terminal_check_unix.go
Guilherme Macedo e7a075cab0 Dependencies bumps
Signed-off-by: Guilherme Macedo <guilherme.macedo@suse.com>
2022-04-05 17:36:46 +02:00

14 lines
227 B
Go

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