Updated formatting
This commit is contained in:
parent
afc4092824
commit
9c8f71be07
25 changed files with 25 additions and 25 deletions
|
@ -8,4 +8,4 @@ import "golang.org/x/sys/unix"
|
|||
func IsTerminal(fd uintptr) bool {
|
||||
_, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA)
|
||||
return err == nil
|
||||
}
|
||||
}
|
|
@ -8,4 +8,4 @@ import "golang.org/x/sys/unix"
|
|||
func IsTerminal(fd uintptr) bool {
|
||||
_, err := unix.IoctlGetTermios(int(fd), unix.TCGETS)
|
||||
return err == nil
|
||||
}
|
||||
}
|
|
@ -5,4 +5,4 @@ package tty
|
|||
// IsTerminal is always false on unsupported platforms.
|
||||
func IsTerminal(fd uintptr) bool {
|
||||
return false
|
||||
}
|
||||
}
|
|
@ -9,4 +9,4 @@ import (
|
|||
|
||||
func TestIsTerminal(t *testing.T) {
|
||||
tty.IsTerminal(os.Stdout.Fd())
|
||||
}
|
||||
}
|
|
@ -9,4 +9,4 @@ func IsTerminal(fd uintptr) bool {
|
|||
var mode uint32
|
||||
err := windows.GetConsoleMode(windows.Handle(fd), &mode)
|
||||
return err == nil
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue