Skip to content

winterm: deprecate types and funcs for golang.org/x/sys - #56

Draft
Sebastiaan van Stijn (thaJeztah) wants to merge 7 commits into
Azure:masterfrom
thaJeztah:deprecate_aliases
Draft

Sebastiaan van Stijn (thaJeztah) wants to merge 7 commits into
Azure:masterfrom
thaJeztah:deprecate_aliases

Conversation

@thaJeztah

@thaJeztah Sebastiaan van Stijn (thaJeztah) commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

winterm: remove uses of type-aliases

winterm: deprecate types and funcs for golang.org/x/sys

This deprecates various types and functions that are now provided
by golang.org/x/sys/windows;

Types:

  • CONSOLE_SCREEN_BUFFER_INFO -> windows.ConsoleScreenBufferInfo
  • COORD -> windows.Coord
  • SMALL_RECT -> windows.SmallRect

Functions:

  • SetConsoleCursorPosition -> windows.SetConsoleCursorPosition
  • GetConsoleMode -> windows.GetConsoleMode
  • SetConsoleMode -> windows.SetConsoleMode
  • GetConsoleScreenBufferInfo -> windows.GetConsoleScreenBufferInfo

Remove the unused String methods from CONSOLE_SCREEN_BUFFER_INFO, COORD,
and SMALL_RECT. These methods were introduced in the initial commit
([go-ansiterm@8b62c38]), apparently for debugging purposes, but are not
used by the package itself and I was not able to find any external uses
that depended on this.

This makes the types identical to their counterparts in golang.org/x/sys/windows,
allowing them to be replaced with type aliases and subsequently deprecated.

[go-ansiterm@8b62c38]: Azure@8b62c38

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah Sebastiaan van Stijn (thaJeztah) changed the title go-ansiterm: deprecate types and funcs for golang.org/x/sys winter: deprecate types and funcs for golang.org/x/sys Oct 13, 2026
@thaJeztah Sebastiaan van Stijn (thaJeztah) changed the title winter: deprecate types and funcs for golang.org/x/sys winterm: deprecate types and funcs for golang.org/x/sys Oct 13, 2026
This deprecates various types and functions that are now provided
by golang.org/x/sys/windows;

Types:

- CONSOLE_SCREEN_BUFFER_INFO -> windows.ConsoleScreenBufferInfo
- COORD -> windows.Coord
- SMALL_RECT -> windows.SmallRect

Functions:

- SetConsoleCursorPosition -> windows.SetConsoleCursorPosition
- GetConsoleMode -> windows.GetConsoleMode
- SetConsoleMode -> windows.SetConsoleMode
- GetConsoleScreenBufferInfo -> windows.GetConsoleScreenBufferInfo

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant