From 89ed40c44bf6818ec76108b95cf9268d88ca156b Mon Sep 17 00:00:00 2001 From: Christian Himpel Date: Mon, 12 Nov 2012 07:25:54 -0800 Subject: [PATCH] faq: mention go vet in "What happens with closures running as goroutines?" R=r CC=golang-dev https://golang.org/cl/6822111 --- doc/go_faq.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/go_faq.html b/doc/go_faq.html index 65445d4220..69296bc27b 100644 --- a/doc/go_faq.html +++ b/doc/go_faq.html @@ -1262,6 +1262,8 @@ each iteration of the loop uses the same instance of the variable v each closure shares that single variable. When the closure runs, it prints the value of v at the time fmt.Println is executed, but v may have been modified since the goroutine was launched. +To help detect this and other problems before they happen, run +go vet.

-- 2.48.1