From c4ec21b1c62b3ec61e806c33a5240fb23d92cadb Mon Sep 17 00:00:00 2001 From: Cheney Date: Sat, 5 Mar 2016 15:27:02 +0800 Subject: [PATCH] fix stdin in windows --- readline.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/readline.go b/readline.go index 53755fc..6e1d0a6 100644 --- a/readline.go +++ b/readline.go @@ -1,9 +1,6 @@ package readline -import ( - "io" - "os" -) +import "io" type Instance struct { Config *Config @@ -71,7 +68,7 @@ func (c *Config) Init() error { } c.inited = true if c.Stdin == nil { - c.Stdin = os.Stdin + c.Stdin = Stdin } if c.Stdout == nil { c.Stdout = Stdout