Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: IsConsole(): fix deprecation comment #36

Merged
merged 1 commit into from
Apr 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions windows/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ func GetHandleInfo(in interface{}) (uintptr, bool) {

// IsConsole returns true if the given file descriptor is a Windows Console.
// The code assumes that GetConsoleMode will return an error for file descriptors that are not a console.
// Deprecated: use golang.org/x/sys/windows.GetConsoleMode() or golang.org/x/term.IsTerminal()
var IsConsole = isConsole
//
// Deprecated: use [windows.GetConsoleMode] or [golang.org/x/term.IsTerminal].
func IsConsole(fd uintptr) bool {
return isConsole(fd)
}

func isConsole(fd uintptr) bool {
var mode uint32
Expand Down