Skip to content

Commit

Permalink
Merge pull request #36 from thaJeztah/fix_deprecation_comment
Browse files Browse the repository at this point in the history
windows: IsConsole(): fix deprecation comment
  • Loading branch information
thaJeztah committed Apr 30, 2023
2 parents 1c456eb + a32e4b2 commit 13e9088
Showing 1 changed file with 5 additions and 2 deletions.
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

0 comments on commit 13e9088

Please sign in to comment.