]> Cypherpunks repositories - gostls13.git/commitdiff
doc: explain how to use "go vet -shadow"
authorIan Lance Taylor <iant@golang.org>
Mon, 17 Dec 2018 23:09:34 +0000 (15:09 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 17 Dec 2018 23:49:15 +0000 (23:49 +0000)
Fixes #29260

Change-Id: I419b74d06380113f4bd32b9aeb053c3be36208d5
Reviewed-on: https://go-review.googlesource.com/c/154584
Reviewed-by: Alan Donovan <adonovan@google.com>
doc/go1.12.html

index 54ebed514228057817667df75e05c01c0ade215b..66c37d5d1db272f5915f7d90ef166984321ae7d6 100644 (file)
@@ -93,6 +93,16 @@ Go 1.13 will require macOS 10.11 El Capitan or later.
   vet</code> should work with all supported versions of Go.
 </p>
 
+<p>
+  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>
+</p>
+
 <h3 id="gocache">Build cache requirement</h3>
 
 <p>