crazy shit.

This commit is contained in:
didier committed 2024-08-09 09:55:52 -04:00
1 parent d57a00bbc8
commit 7bf9a0398f
356 files changed
+196503 -3

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
package logrus
import (
"golang.org/x/sys/unix"
)
// IsTerminal returns true if the given file descriptor is a terminal.
func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermio(fd, unix.TCGETA)
return err == nil
}