Added Windows support
This commit is contained in:
@ -1,6 +1,10 @@
|
||||
package tty
|
||||
|
||||
import "golang.org/x/sys/windows"
|
||||
|
||||
// IsTerminal returns true if the file descriptor is a terminal.
|
||||
func IsTerminal(fd uintptr) bool {
|
||||
return false
|
||||
var mode uint32
|
||||
err := windows.GetConsoleMode(windows.Handle(fd), &mode)
|
||||
return err == nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user