Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Why goexpect use TeeWriter to handle both stdout and stderr #61

Open
fangxlmr opened this issue Jan 27, 2021 · 3 comments
Open

Why goexpect use TeeWriter to handle both stdout and stderr #61

fangxlmr opened this issue Jan 27, 2021 · 3 comments

Comments

@fangxlmr
Copy link

Hi, the crew, great job of this package!

go rdr(sErr)

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

@skalle
Copy link
Contributor

skalle commented Jan 27, 2021

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.. :)

@fangxlmr
Copy link
Author

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.

@skalle
Copy link
Contributor

skalle commented Jan 28, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants