goexpect
goexpect copied to clipboard
Why goexpect use TeeWriter to handle both stdout and stderr
Hi, the crew, great job of this package!
https://github.com/google/goexpect/blob/b5b77125c2c58628339d1f0a3d12d6dfd1b2a5e2/expect.go#L1161
As said, goexpect wirte stdout and stderr both to an io.Writer (if any). Isn't it resonable to handle them separately?
BTW, tee
command itself merely captures stdout. ;P
Hey thx. for the feedback @fangxlmr.
Sounds reasonable to me, currently my cycles are very limited so could be a while before I'll have a chance to dig into this.
PRs are always prioritized though.. :)
Well, a single teeWriter
-like option for handling both stdin and stdout does has its advantange, whereas an option to handle them separately may also have its own position.
Yeah GoExpect do have the concept of options, should probably be implemented as a new option with the default being the current way it's handled.