]> Cypherpunks repositories - gostls13.git/commitdiff
doc: add a bunch of missing <p> tags
authorStefan Nilsson <snilsson@nada.kth.se>
Wed, 29 Feb 2012 23:07:52 +0000 (15:07 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 29 Feb 2012 23:07:52 +0000 (15:07 -0800)
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5707065

doc/code.html
doc/effective_go.html
doc/effective_go.tmpl
doc/go_faq.html
doc/go_spec.html

index 5ae57075ed627af1021597e1b2e614a3b2e36468..625a98c1f1e696092a1942600e09ad7102a18290 100644 (file)
@@ -323,7 +323,7 @@ foo_amd64.go
 foo_arm.go
 </pre>
 
-describes a package that builds on
+<p>describes a package that builds on
 different architectures by parameterizing the file name with
 <code>$GOARCH</code>.</p>
 
index c9eac99ba5de1dbb7e831a6143f8469474a6d758..096a6552146ca521d7e403114b36554fc9f616bb 100644 (file)
@@ -1617,40 +1617,49 @@ Now we have the missing piece we needed to explain the design of
 the <code>append</code> built-in function.  The signature of <code>append</code>
 is different from our custom <code>Append</code> function above.
 Schematically, it's like this:
+</p>
 <pre>
 func append(slice []<i>T</i>, elements...T) []<i>T</i>
 </pre>
+<p>
 where <i>T</i> is a placeholder for any given type.  You can't
 actually write a function in Go where the type <code>T</code>
 is determined by the caller.
 That's why <code>append</code> is built in: it needs support from the
 compiler.
+</p>
 <p>
 What <code>append</code> does is append the elements to the end of
 the slice and return the result.  The result needs to be returned
 because, as with our hand-written <code>Append</code>, the underlying
 array may change.  This simple example
+</p>
 <pre>
 x := []int{1,2,3}
 x = append(x, 4, 5, 6)
 fmt.Println(x)
 </pre>
+<p>
 prints <code>[1 2 3 4 5 6]</code>.  So <code>append</code> works a
 little like <code>Printf</code>, collecting an arbitrary number of
 arguments.
+</p>
 <p>
 But what if we wanted to do what our <code>Append</code> does and
 append a slice to a slice?  Easy: use <code>...</code> at the call
 site, just as we did in the call to <code>Output</code> above.  This
 snippet produces identical output to the one above.
+</p>
 <pre>
 x := []int{1,2,3}
 y := []int{4,5,6}
 x = append(x, y...)
 fmt.Println(x)
 </pre>
+<p>
 Without that <code>...</code>, it wouldn't compile because the types
 would be wrong; <code>y</code> is not of type <code>int</code>.
+</p>
 
 <h2 id="initialization">Initialization</h2>
 
index 446b0525e34ea084fe97687e540f305c70cd06e7..340acb4d9f325caa0ffdb05ef746e6543d56351e 100644 (file)
@@ -1613,40 +1613,49 @@ Now we have the missing piece we needed to explain the design of
 the <code>append</code> built-in function.  The signature of <code>append</code>
 is different from our custom <code>Append</code> function above.
 Schematically, it's like this:
+</p>
 <pre>
 func append(slice []<i>T</i>, elements...T) []<i>T</i>
 </pre>
+<p>
 where <i>T</i> is a placeholder for any given type.  You can't
 actually write a function in Go where the type <code>T</code>
 is determined by the caller.
 That's why <code>append</code> is built in: it needs support from the
 compiler.
+</p>
 <p>
 What <code>append</code> does is append the elements to the end of
 the slice and return the result.  The result needs to be returned
 because, as with our hand-written <code>Append</code>, the underlying
 array may change.  This simple example
+</p>
 <pre>
 x := []int{1,2,3}
 x = append(x, 4, 5, 6)
 fmt.Println(x)
 </pre>
+<p>
 prints <code>[1 2 3 4 5 6]</code>.  So <code>append</code> works a
 little like <code>Printf</code>, collecting an arbitrary number of
 arguments.
+</p>
 <p>
 But what if we wanted to do what our <code>Append</code> does and
 append a slice to a slice?  Easy: use <code>...</code> at the call
 site, just as we did in the call to <code>Output</code> above.  This
 snippet produces identical output to the one above.
+</p>
 <pre>
 x := []int{1,2,3}
 y := []int{4,5,6}
 x = append(x, y...)
 fmt.Println(x)
 </pre>
+<p>
 Without that <code>...</code>, it wouldn't compile because the types
 would be wrong; <code>y</code> is not of type <code>int</code>.
+</p>
 
 <h2 id="initialization">Initialization</h2>
 
index 5e213ff532ee4b32be262c4e22c410c113d6856c..443bfd61084f3d8bb7ffb5d7ff4ffddf0da16a38 100644 (file)
@@ -1524,7 +1524,9 @@ declaration should present the same order as <code>:=</code> so
 <pre>
     var a uint64 = 1
 </pre>
+<p>
 has the same effect as
+</p>
 <pre>
     a := uint64(1)
 </pre>
index ae0a4616a71332d60248e865877677a043d4d156..1be629146f2102ab89975346ea5f978ad1c36411 100644 (file)
@@ -696,10 +696,11 @@ using a receiver of that type.
 
 <h3 id="Boolean_types">Boolean types</h3>
 
+<p>
 A <i>boolean type</i> represents the set of Boolean truth values
 denoted by the predeclared constants <code>true</code>
 and <code>false</code>. The predeclared boolean type is <code>bool</code>.
-
+</p>
 
 <h3 id="Numeric_types">Numeric types</h3>