doc: fix typo in spec example code comment

R=r, golang-dev, adg
CC=golang-dev
https://golang.org/cl/5308071
This commit is contained in:
Charles L. Dorian 2011-11-01 15:13:33 +09:00 committed by Andrew Gerrand
parent b910a27396
commit 44262d1574

View File

@ -191,7 +191,7 @@ token is
<li>an <li>an
<a href="#Identifiers">identifier</a> <a href="#Identifiers">identifier</a>
</li> </li>
<li>an <li>an
<a href="#Integer_literals">integer</a>, <a href="#Integer_literals">integer</a>,
<a href="#Floating-point_literals">floating-point</a>, <a href="#Floating-point_literals">floating-point</a>,
@ -199,14 +199,14 @@ token is
<a href="#Character_literals">character</a>, or <a href="#Character_literals">character</a>, or
<a href="#String_literals">string</a> literal <a href="#String_literals">string</a> literal
</li> </li>
<li>one of the <a href="#Keywords">keywords</a> <li>one of the <a href="#Keywords">keywords</a>
<code>break</code>, <code>break</code>,
<code>continue</code>, <code>continue</code>,
<code>fallthrough</code>, or <code>fallthrough</code>, or
<code>return</code> <code>return</code>
</li> </li>
<li>one of the <a href="#Operators_and_Delimiters">operators and delimiters</a> <li>one of the <a href="#Operators_and_Delimiters">operators and delimiters</a>
<code>++</code>, <code>++</code>,
<code>--</code>, <code>--</code>,
@ -1237,7 +1237,7 @@ make(chan int, 100)
<p> <p>
The capacity, in number of elements, sets the size of the buffer in the channel. If the The capacity, in number of elements, sets the size of the buffer in the channel. If the
capacity is greater than zero, the channel is asynchronous: communication operations capacity is greater than zero, the channel is asynchronous: communication operations
succeed without blocking if the buffer is not full (sends) or not empty (receives), succeed without blocking if the buffer is not full (sends) or not empty (receives),
and elements are received in the order they are sent. and elements are received in the order they are sent.
If the capacity is zero or absent, the communication succeeds only when both a sender and If the capacity is zero or absent, the communication succeeds only when both a sender and
@ -4326,7 +4326,7 @@ func complex_f3() (re float64, im float64) {
func (devnull) Write(p []byte) (n int, _ os.Error) { func (devnull) Write(p []byte) (n int, _ os.Error) {
n = len(p) n = len(p)
return return
} }
</pre> </pre>
</li> </li>
</ol> </ol>
@ -4441,7 +4441,7 @@ L1:
</pre> </pre>
<p> <p>
is erroneous because the label <code>L1</code> is inside is erroneous because the label <code>L1</code> is inside
the "for" statement's block but the <code>goto</code> is not. the "for" statement's block but the <code>goto</code> is not.
</p> </p>
@ -4801,7 +4801,7 @@ var rl = real(c64) // float32
<p> Two built-in functions, <code>panic</code> and <code>recover</code>, <p> Two built-in functions, <code>panic</code> and <code>recover</code>,
assist in reporting and handling <a href="#Run_time_panics">run-time panics</a> assist in reporting and handling <a href="#Run_time_panics">run-time panics</a>
and program-defined error conditions. and program-defined error conditions.
</p> </p>
<pre class="grammar"> <pre class="grammar">
@ -4851,7 +4851,7 @@ run-time panics raised by <code>g</code>.
<pre> <pre>
func protect(g func()) { func protect(g func()) {
defer func() { defer func() {
log.Println("done") // Println executes normally even in there is a panic log.Println("done") // Println executes normally even if there is a panic
if x := recover(); x != nil { if x := recover(); x != nil {
log.Printf("run time panic: %v", x) log.Printf("run time panic: %v", x)
} }
@ -5145,7 +5145,7 @@ A complete program is created by linking a single, unimported package
called the <i>main package</i> with all the packages it imports, transitively. called the <i>main package</i> with all the packages it imports, transitively.
The main package must The main package must
have package name <code>main</code> and have package name <code>main</code> and
declare a function <code>main</code> that takes no declare a function <code>main</code> that takes no
arguments and returns no value. arguments and returns no value.
</p> </p>
@ -5161,7 +5161,7 @@ It does not wait for other (non-<code>main</code>) goroutines to complete.
</p> </p>
<p> <p>
Package initialization&mdash;variable initialization and the invocation of Package initialization&mdash;variable initialization and the invocation of
<code>init</code> functions&mdash;happens in a single goroutine, <code>init</code> functions&mdash;happens in a single goroutine,
sequentially, one package at a time. sequentially, one package at a time.
An <code>init</code> function may launch other goroutines, which can run An <code>init</code> function may launch other goroutines, which can run