Skip to content

Commit a704224

Browse files
committed
os/exec: simplify doc wording for cmd.StdoutPipe and cmd.StderrPipe
The existing text was hard to parse. Shorten the sentences and simplify the text. Change-Id: Ic16f486925090ea303c04e70969e5a4b27a60896 Reviewed-on: https://go-review.googlesource.com/c/go/+/198758 Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent adc4d2c commit a704224

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/os/exec/exec.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,8 @@ func (c *closeOnce) close() {
606606
// standard output when the command starts.
607607
//
608608
// Wait will close the pipe after seeing the command exit, so most callers
609-
// need not close the pipe themselves; however, an implication is that
610-
// it is incorrect to call Wait before all reads from the pipe have completed.
609+
// need not close the pipe themselves. It is thus incorrect to call Wait
610+
// before all reads from the pipe have completed.
611611
// For the same reason, it is incorrect to call Run when using StdoutPipe.
612612
// See the example for idiomatic usage.
613613
func (c *Cmd) StdoutPipe() (io.ReadCloser, error) {
@@ -631,8 +631,8 @@ func (c *Cmd) StdoutPipe() (io.ReadCloser, error) {
631631
// standard error when the command starts.
632632
//
633633
// Wait will close the pipe after seeing the command exit, so most callers
634-
// need not close the pipe themselves; however, an implication is that
635-
// it is incorrect to call Wait before all reads from the pipe have completed.
634+
// need not close the pipe themselves. It is thus incorrect to call Wait
635+
// before all reads from the pipe have completed.
636636
// For the same reason, it is incorrect to use Run when using StderrPipe.
637637
// See the StdoutPipe example for idiomatic usage.
638638
func (c *Cmd) StderrPipe() (io.ReadCloser, error) {

0 commit comments

Comments
 (0)