aboutsummaryrefslogtreecommitdiff
path: root/doc/go_spec.html
diff options
context:
space:
mode:
authorDina Garmash <dgrmsh@gmail.com>2018-08-30 16:59:29 -0400
committerRobert Griesemer <gri@golang.org>2018-08-31 06:39:16 +0000
commit8a2b5f1f39152e45e6cfe6264612f00891d0327e (patch)
tree6cf557a5be8906c50015d4279e57d5edeaf8e333 /doc/go_spec.html
parent58e970ed79807fd9d2a29e1dcd4e44fa867b5540 (diff)
downloadgo-8a2b5f1f39152e45e6cfe6264612f00891d0327e.tar.gz
go-8a2b5f1f39152e45e6cfe6264612f00891d0327e.zip
doc: fix os.Pipe() call in the example.
Short variable declarations example passes an fd argument to os.Pipe call. However, os.Pipe() takes no arguments and returns 2 Files and an error: https://golang.org/src/os/pipe_linux.go?s=319:360#L1 Fixes: #27384 Change-Id: I0a709f51e0878c57185d901b899d209f001dfcce Reviewed-on: https://go-review.googlesource.com/132284 Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'doc/go_spec.html')
-rw-r--r--doc/go_spec.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html
index f70ff7a02f..57bb3b53f5 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
- "Subtitle": "Version of May 9, 2018",
+ "Subtitle": "Version of August 30, 2018",
"Path": "/ref/spec"
}-->
@@ -2112,8 +2112,8 @@ with initializer expressions but no types:
i, j := 0, 10
f := func() int { return 7 }
ch := make(chan int)
-r, w := os.Pipe(fd) // os.Pipe() returns two values
-_, y, _ := coord(p) // coord() returns three values; only interested in y coordinate
+r, w, _ := os.Pipe() // os.Pipe() returns a connected pair of Files and an error, if any
+_, y, _ := coord(p) // coord() returns three values; only interested in y coordinate
</pre>
<p>