Loading get.go +7 −7 Original line number Diff line number Diff line Loading @@ -64,14 +64,14 @@ func New() (*Expect, error) { return x, nil } func asyncBool(c chan<- bool, b bool) { func asyncSendBool(c chan<- bool, b bool) { go func() { c <- b }() } func (x *Expect) Close() error { asyncBool(x.terminateStream, true) asyncSendBool(x.terminateStream, true) <-x.finishedStream return nil } Loading Loading @@ -181,8 +181,8 @@ func (x *Expect) worker(started chan<- bool) { case !valid || !terminate: continue default: asyncBool(terminateOutStream, true) asyncBool(terminateErrStream, true) asyncSendBool(terminateOutStream, true) asyncSendBool(terminateErrStream, true) } case terminated, valid := <-terminatedOutStream: switch { Loading @@ -190,7 +190,7 @@ func (x *Expect) worker(started chan<- bool) { continue default: terminatedOut = true asyncBool(checkStream, true) asyncSendBool(checkStream, true) } case terminated, valid := <-terminatedErrStream: switch { Loading @@ -198,7 +198,7 @@ func (x *Expect) worker(started chan<- bool) { continue default: terminatedErr = true asyncBool(checkStream, true) asyncSendBool(checkStream, true) } case check, valid := <-checkStream: switch { Loading @@ -220,7 +220,7 @@ func process( terminateStream <-chan bool, terminatedStream chan<- bool, ) { defer asyncBool(terminatedStream, true) defer asyncSendBool(terminatedStream, true) matches := []PatternValue{} startedStream <- true Loading Loading
get.go +7 −7 Original line number Diff line number Diff line Loading @@ -64,14 +64,14 @@ func New() (*Expect, error) { return x, nil } func asyncBool(c chan<- bool, b bool) { func asyncSendBool(c chan<- bool, b bool) { go func() { c <- b }() } func (x *Expect) Close() error { asyncBool(x.terminateStream, true) asyncSendBool(x.terminateStream, true) <-x.finishedStream return nil } Loading Loading @@ -181,8 +181,8 @@ func (x *Expect) worker(started chan<- bool) { case !valid || !terminate: continue default: asyncBool(terminateOutStream, true) asyncBool(terminateErrStream, true) asyncSendBool(terminateOutStream, true) asyncSendBool(terminateErrStream, true) } case terminated, valid := <-terminatedOutStream: switch { Loading @@ -190,7 +190,7 @@ func (x *Expect) worker(started chan<- bool) { continue default: terminatedOut = true asyncBool(checkStream, true) asyncSendBool(checkStream, true) } case terminated, valid := <-terminatedErrStream: switch { Loading @@ -198,7 +198,7 @@ func (x *Expect) worker(started chan<- bool) { continue default: terminatedErr = true asyncBool(checkStream, true) asyncSendBool(checkStream, true) } case check, valid := <-checkStream: switch { Loading @@ -220,7 +220,7 @@ func process( terminateStream <-chan bool, terminatedStream chan<- bool, ) { defer asyncBool(terminatedStream, true) defer asyncSendBool(terminatedStream, true) matches := []PatternValue{} startedStream <- true Loading