File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import (
2020 "errors"
2121 "io"
2222 "os"
23- "runtime"
2423)
2524
2625var ErrNotAConsole = errors .New ("provided file is not a console" )
@@ -61,11 +60,7 @@ type WinSize struct {
6160
6261// Current returns the current processes console
6362func Current () Console {
64- f := os .Stdin
65- if runtime .GOOS == "windows" {
66- f = os .Stdout
67- }
68- c , err := ConsoleFromFile (f )
63+ c , err := ConsoleFromFile (os .Stdin )
6964 if err != nil {
7065 // stdin should always be a console for the design
7166 // of this function
Original file line number Diff line number Diff line change @@ -150,11 +150,11 @@ func (m *master) Close() error {
150150}
151151
152152func (m * master ) Read (b []byte ) (int , error ) {
153- panic ( "not implemented on windows" )
153+ return os . Stdin . Read ( b )
154154}
155155
156156func (m * master ) Write (b []byte ) (int , error ) {
157- panic ( "not implemented on windows" )
157+ return os . Stdout . Write ( b )
158158}
159159
160160func (m * master ) Fd () uintptr {
You can’t perform that action at this time.
0 commit comments