We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c99aa98 + 07e1b5f commit 43d0a6eCopy full SHA for 43d0a6e
1 file changed
windows/console.go
@@ -16,16 +16,12 @@ func GetHandleInfo(in interface{}) (uintptr, bool) {
16
return t.Fd(), true
17
case *ansiWriter:
18
19
+ case *os.File:
20
+ fd := t.Fd()
21
+ return fd, isConsole(fd)
22
+ default:
23
+ return 0, false
24
}
-
- var inFd uintptr
- var isTerminal bool
- if file, ok := in.(*os.File); ok {
25
- inFd = file.Fd()
26
- isTerminal = isConsole(inFd)
27
- }
28
- return inFd, isTerminal
29
30
31
// IsConsole returns true if the given file descriptor is a Windows Console.
0 commit comments