Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
What version of Go are you using (
What operating system and processor architecture are you using (
What did you do?
Let's use exec.Command to catch both stdout and stderr.
Here is the simplified example that only cat a file.
If order of ReadAll would be opposite, this example will run correctly.
What did you expect to see?
What did you see instead?
This is unfortunately just how Unix pipes work. You need to read from both pipes at the same time. What's happening is that
This is why