From: Tobias Klauser -shadow
option
is no longer available with go vet
. Checking for
variable shadowing may now be done using
-
- go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
- go vet -vettool=$(which shadow)
-
+
+go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
+go vet -vettool=$(which shadow)
+
File
type has a new
LineStart
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 token.Pos
mechanism to identify file positions.
@@ -662,7 +662,7 @@ for {
an iterator for ranging over a map. This type is exposed through the
Value
type's new
MapRange
method.
- This follows the same iteration semantics as a range statment, with Next
+ This follows the same iteration semantics as a range statement, with Next
to advance the iterator, and Key
/Value
to access each entry.