You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation recommends getting the file descriptor with the following:
oldState, err:=term.MakeRaw(int(os.Stdin.Fd()))
os.Stdin.Fd returns a uintptr, which can't (technically) be safely cast to an int. This appears to be because on windows, the value may be non-numeric. It isn't clear that this lib handles that case, and the use of int obscures that.
term should take a uintptr as its fd and handle cross-platform terminal behavior gracefully. If it isn't going to do that, the docs should be updated to make it clear that x/term really only applies to unix terminals.