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

13 lines
246 B
Go

// +build darwin dragonfly freebsd netbsd openbsd
package logrus
import "golang.org/x/sys/unix"
const ioctlReadTermios = unix.TIOCGETA
func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
}