code: func IsConsole(fd uintptr) bool {
  	_, e := winterm.GetConsoleMode(fd)
  	return e == nil
  }
docs: // 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.