aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2019-10-03 14:06:08 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2019-10-04 00:22:44 +0000
commita7042249abdba39a7c8dce35661b62094eb97117 (patch)
tree6bdcfcfcee3bc5c56ce7b6c1c53ca23b073f2984
parentadc4d2cc2dbc20c14bae7bbdbca8d75421e1bef5 (diff)
downloadgo-a7042249abdba39a7c8dce35661b62094eb97117.tar.gz
go-a7042249abdba39a7c8dce35661b62094eb97117.zip
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 <iant@golang.org>
-rw-r--r--src/os/exec/exec.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go
index 17ef003eca..19c7e2406a 100644
--- a/src/os/exec/exec.go
+++ b/src/os/exec/exec.go
@@ -606,8 +606,8 @@ func (c *closeOnce) close() {
// standard output when the command starts.
//
// Wait will close the pipe after seeing the command exit, so most callers
-// need not close the pipe themselves; however, an implication is that
-// it is incorrect to call Wait before all reads from the pipe have completed.
+// need not close the pipe themselves. It is thus incorrect to call Wait
+// before all reads from the pipe have completed.
// For the same reason, it is incorrect to call Run when using StdoutPipe.
// See the example for idiomatic usage.
func (c *Cmd) StdoutPipe() (io.ReadCloser, error) {
@@ -631,8 +631,8 @@ func (c *Cmd) StdoutPipe() (io.ReadCloser, error) {
// standard error when the command starts.
//
// Wait will close the pipe after seeing the command exit, so most callers
-// need not close the pipe themselves; however, an implication is that
-// it is incorrect to call Wait before all reads from the pipe have completed.
+// need not close the pipe themselves. It is thus incorrect to call Wait
+// before all reads from the pipe have completed.
// For the same reason, it is incorrect to use Run when using StderrPipe.
// See the StdoutPipe example for idiomatic usage.
func (c *Cmd) StderrPipe() (io.ReadCloser, error) {