bastion 0.53.2
ci / personal-data (push) Successful in 5s
ci / test (push) Successful in 3m4s
ci / fuzz (push) Successful in 3m45s

This commit is contained in:
Privatae
2026-10-20 04:42:14 +00:00
commit e4c9b69b46
471 changed files with 159794 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
//go:build windows
package main
import (
"os"
"golang.org/x/sys/windows"
)
// stdioIsConsole: both standard input and standard output are a console, not
// a file or a pipe.
func stdioIsConsole() bool {
var mode uint32
return windows.GetConsoleMode(windows.Handle(os.Stdin.Fd()), &mode) == nil &&
windows.GetConsoleMode(windows.Handle(os.Stdout.Fd()), &mode) == nil
}
// stdinIsConsole: standard input alone is a console (pair_stdin.go).
func stdinIsConsole() bool {
var mode uint32
return windows.GetConsoleMode(windows.Handle(os.Stdin.Fd()), &mode) == nil
}