mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-02 09:21:40 +02:00
3f7e107d09
* Updated go.mod * Updated go.sum * Updated vendor packages Signed-off-by: Glenn Vriesman <glenn.vriesman@gmail.com>
12 lines
224 B
Go
12 lines
224 B
Go
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
|
|
}
|