Loading get.go +5 −3 Original line number Diff line number Diff line package get import ( "fmt" "io" "strings" "sync" Loading Loading @@ -91,11 +92,11 @@ func (x *Expect) Wait(c Channel, match, text string) error { func (x *Expect) worker(started chan<- bool) { var wg sync.WaitGroup stdin := &mb.MutexBuffer{} stdinReader, stdinWriter := io.Pipe() stdout := &mb.MutexBuffer{} stderr := &mb.MutexBuffer{} x.stdin = stdin x.stdin = stdinReader x.stdout = stdout x.stderr = stderr Loading Loading @@ -158,7 +159,8 @@ func (x *Expect) worker(started chan<- bool) { continue } //stdin.Reset() stdin.Write([]byte(s)) //stdinWriter.Write([]byte(s)) fmt.Fprintln(stdinWriter, s) //x.stdin.Reset() //x.stdin.Write([]byte(s)) //io.WriteString(stdin, s) Loading Loading
get.go +5 −3 Original line number Diff line number Diff line package get import ( "fmt" "io" "strings" "sync" Loading Loading @@ -91,11 +92,11 @@ func (x *Expect) Wait(c Channel, match, text string) error { func (x *Expect) worker(started chan<- bool) { var wg sync.WaitGroup stdin := &mb.MutexBuffer{} stdinReader, stdinWriter := io.Pipe() stdout := &mb.MutexBuffer{} stderr := &mb.MutexBuffer{} x.stdin = stdin x.stdin = stdinReader x.stdout = stdout x.stderr = stderr Loading Loading @@ -158,7 +159,8 @@ func (x *Expect) worker(started chan<- bool) { continue } //stdin.Reset() stdin.Write([]byte(s)) //stdinWriter.Write([]byte(s)) fmt.Fprintln(stdinWriter, s) //x.stdin.Reset() //x.stdin.Write([]byte(s)) //io.WriteString(stdin, s) Loading