]> Cypherpunks repositories - gostls13.git/commitdiff
faq: mention go vet in "What happens with closures running as goroutines?"
authorChristian Himpel <chressie@googlemail.com>
Mon, 12 Nov 2012 15:25:54 +0000 (07:25 -0800)
committerRob Pike <r@golang.org>
Mon, 12 Nov 2012 15:25:54 +0000 (07:25 -0800)
R=r
CC=golang-dev
https://golang.org/cl/6822111

doc/go_faq.html

index 65445d4220fc4ba936fdfd6af38ae90dbeefad98..69296bc27b07a0a611214a59a9c85185012d112b 100644 (file)
@@ -1262,6 +1262,8 @@ each iteration of the loop uses the same instance of the variable <code>v</code>
 each closure shares that single variable. When the closure runs, it prints the 
 value of <code>v</code> at the time <code>fmt.Println</code> is executed,
 but <code>v</code> may have been modified since the goroutine was launched. 
+To help detect this and other problems before they happen, run
+<a href="http://golang.org/cmd/go/#Run_go_tool_vet_on_packages"><code>go vet</code></a>.
 </p>
 
 <p>