readline
readline copied to clipboard
Only use RawReader on Windows if stdin is a console
Fixes #229
FYI: This uses the syscall.SyscallN function (instead of the deprecated Syscall5, etc.) to simplify the code a bit. That function was introduced in go1.18. I'm not sure if there is any desire to support compiling this library on older versions of go (I see go 1.15 is set in go.mod but that seems to only affect syntax), but if there is I can switch it back to the deprecated methods.