]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.12: fix typos and code formatting
authorTobias Klauser <tklauser@distanz.ch>
Wed, 19 Dec 2018 08:36:11 +0000 (09:36 +0100)
committerTobias Klauser <tobias.klauser@gmail.com>
Wed, 19 Dec 2018 15:55:32 +0000 (15:55 +0000)
Fix two typos and don't indent the go vet example.

Change-Id: Iccec56ca5decfbae45547a00115500ed13b703e1
Reviewed-on: https://go-review.googlesource.com/c/154721
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go1.12.html

index 2b64adffefcae9f22db7eff95f4a8f426d81329e..4fed4b7fc4a2f70b4d4336e938a446556862239a 100644 (file)
@@ -113,10 +113,10 @@ Do not send CLs removing the interior tags from such phrases.
   As part of this change, the experimental <code>-shadow</code> option
   is no longer available with <code>go vet</code>. Checking for
   variable shadowing may now be done using
-  <pre>
-    go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
-    go vet -vettool=$(which shadow)
-  </pre>
+<pre>
+go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
+go vet -vettool=$(which shadow)
+</pre>
 </p>
 
 <h3 id="gocache">Build cache requirement</h3>
@@ -505,7 +505,7 @@ for {
       The <a href="/pkg/go/token#File"><code>File</code></a> type has a new
       <a href="/pkg/go/token#File.LineStart"><code>LineStart</code></a> field,
       which returns the position of the start of a given line. This is especially useful
-      in programs that occassionally handle non-Go files, such as assembly, but wish to use
+      in programs that occasionally handle non-Go files, such as assembly, but wish to use
       the <code>token.Pos</code> mechanism to identify file positions.
     </p>
 
@@ -662,7 +662,7 @@ for {
       an iterator for ranging over a map. This type is exposed through the
       <a href="/pkg/reflect#Value"><code>Value</code></a> type's new
       <a href="/pkg/reflect#Value.MapRange"><code>MapRange</code></a> method.
-      This follows the same iteration semantics as a range statment, with <code>Next</code>
+      This follows the same iteration semantics as a range statement, with <code>Next</code>
       to advance the iterator, and <code>Key</code>/<code>Value</code> to access each entry.
     </p>