summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-11-15 12:09:59 -0800
committerRob Pike <r@golang.org>2009-11-15 12:09:59 -0800
commit39dcfb16bd1970a24b461b2cc489f0ba962ac6d0 (patch)
tree91105fdf0267af65481a86ce47996cb2c12a9737
parent505e65563af267c6911981d54ab61914bab4f3a0 (diff)
downloadgolang-39dcfb16bd1970a24b461b2cc489f0ba962ac6d0.tar.gz
fix some typos in the documentation
Fixes issue 196. R=rsc http://codereview.appspot.com/154152
-rw-r--r--doc/effective_go.html4
-rw-r--r--doc/go_tutorial.html4
-rw-r--r--doc/go_tutorial.txt2
3 files changed, 5 insertions, 5 deletions
diff --git a/doc/effective_go.html b/doc/effective_go.html
index 2d6403d0d..2c82ac91b 100644
--- a/doc/effective_go.html
+++ b/doc/effective_go.html
@@ -977,14 +977,14 @@ you can pass a pointer to the array.
<pre>
func Sum(a *[3]float) (sum float) {
- for _, v := range a {
+ for _, v := range *a {
sum += v
}
return
}
array := [...]float{7.0, 8.5, 9.1};
-x := sum(&amp;array); // Note the explicit address-of operator
+x := Sum(&amp;array); // Note the explicit address-of operator
</pre>
<p>
diff --git a/doc/go_tutorial.html b/doc/go_tutorial.html
index 201c503bb..9ed408d34 100644
--- a/doc/go_tutorial.html
+++ b/doc/go_tutorial.html
@@ -550,7 +550,7 @@ declaration on line 31; it declares <code>r</code> and <code>e</code> to hold th
both of type <code>int</code> (although you'd have to look at the <code>syscall</code> package
to see that). Finally, line 35 returns two values: a pointer to the new <code>File</code>
and the error. If <code>syscall.Open</code> fails, the file descriptor <code>r</code> will
-be negative and <code>NewFile</code> will return <code>nil</code>.
+be negative and <code>newFile</code> will return <code>nil</code>.
<p>
About those errors: The <code>os</code> library includes a general notion of an error.
It's a good idea to use its facility in your own interfaces, as we do here, for
@@ -1279,7 +1279,7 @@ code that invokes the operation and responds to the request:
19 }
</pre>
<p>
-Line 18 defines the name <code>binOp</code> to be a function taking two integers and
+Line 14 defines the name <code>binOp</code> to be a function taking two integers and
returning a third.
<p>
The <code>server</code> routine loops forever, receiving requests and, to avoid blocking due to
diff --git a/doc/go_tutorial.txt b/doc/go_tutorial.txt
index 1e876d5ca..dae3c6815 100644
--- a/doc/go_tutorial.txt
+++ b/doc/go_tutorial.txt
@@ -841,7 +841,7 @@ code that invokes the operation and responds to the request:
--PROG progs/server.go /type.binOp/ /^}/
-Line 18 defines the name "binOp" to be a function taking two integers and
+Line 14 defines the name "binOp" to be a function taking two integers and
returning a third.
The "server" routine loops forever, receiving requests and, to avoid blocking due to