1
0
mirror of https://github.com/golang/go synced 2024-11-23 05:00:07 -07:00

doc/go1.12: fix typos and code formatting

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>
This commit is contained in:
Tobias Klauser 2018-12-19 09:36:11 +01:00 committed by Tobias Klauser
parent d9e2ba4fcc
commit 1e88d91eb2

View 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>