On Wed, Feb 20, 2013 at 8:40 AM, Jay Weisskopf wrote:

I wasted a lot of time on a bug today that was caused by shadowing (= was
mistakenly :=). I've seen some people mentioning the "go vet" command, but
I can't find much information on it. It warns about shadowed variables, or
was someone just throwing that out as an idea?

AFAIK, it does not warn about this. IMO it should not warn about this. I
use some "scripts" which demand `$ go vet` says nothing in the case of
valid code (cca a pre commit hook). It would be sad if it will start to
rant about code w/o any troubles. I think I have some (working) code which
would not pass.



$ go vet -h
$ go help vet


$ godoc vet


You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts


Follow ups

Related Discussions



site design / logo © 2021 Grokbase