You can easily write a portable one. Just read and discard until no more
available. Then make the call to the input read.
> On May 3, 2019, at 7:28 AM, Steve Mynott wrote:
>
> I've a terminal app where I read y/n confirm using fmt.Scanln and I'm trying
> to flush the keyboard buffer before t
I've a terminal app where I read y/n confirm using fmt.Scanln and I'm
trying to flush the keyboard buffer before this.
On linux (and probably other UNIX systems) I can use
unix.Syscall(unix.SYS_IOCTL, 0, unix.TCFLSH, 0)
but this isn't portable (specifically to macOS which it would be nice to
su