Hi!

On Mon, Mar 19, 2018 at 05:52:52AM -0700, Matt Mueller wrote:
> Is it possible to programmatically tell os.Stdin that we've reached EOF 
> while you're trying to read from it?

As default os.Stdin is in blocking mode then only way to have it read EOF
after calling Read() on it is to actually press Ctrl-D. If you need to
interrupt this Read() before it'll read actual EOF then you need to either
change os.Stdin to non-blocking or replace it with another *os.File.

-- 
                        WBR, Alex.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to