cancelreader
cancelreader copied to clipboard
A cancelable reader for Go
Previously, the error returned by `unix.EpollCtl` was discarded. This PR improves the error messages and includes the file descriptors as they are likely related to any error that can occur....
According to the Windows documentation (https://learn.microsoft.com/en-us/windows/console/ctrl-c-and-ctrl-break-signals) > The SetConsoleMode function can disable the ENABLE_PROCESSED_INPUT input mode > for a console's input buffer, so CTRL+C is reported as keyboard input rather...
According to the [Windows documentation](https://learn.microsoft.com/en-us/windows/console/ctrl-c-and-ctrl-break-signals): > The [SetConsoleMode](https://learn.microsoft.com/en-us/windows/console/setconsolemode) function can disable the ENABLE_PROCESSED_INPUT input mode for a console's input buffer, so CTRL+C is reported as keyboard input rather than as...
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20220204135822-1c1b9b1eba6a to 0.9.0. Commits See full diff in compare view [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter...
Fixes #7. I updated the README here, and added a check to `NewReader` to ensure the supplied reader is a console. I also created a unit test that runs `NewReader`...
On Windows, `NewReader(os.Stdin)` will replace stdin with a handle to the console, even when stdin was previously redirected from a pipe. This can be fixed by returning `newFallbackCancelReader(reader)` when stdin...