1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-29 23:38:14 +02:00
Files
starter/vendor/github.com/ManyakRus/logrus/terminal_check_unix.go
Nikitin Aleksandr 66e89131a4 сделал log
2023-04-25 17:28:10 +03:00

14 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
}