[go] Add skip_vet option for build

The go vet command has a special invokation mode for which it can be
directed to vet the go source tree itself. This mode allows one to
specify whitelists for checks to ignore. When running go vet on a random
package, these whitelists can't be used.

Because we currently build go tests as separate packages to run on
Fuchsia targets, we cannot make use of this go vet mode for our
packages.

The CPU pprof test relies on the runtime's pprof package, which has one
of these go vet exceptions. Since the whitelist can't be used, we can't
detect this exception. The simplest path forward is to allow skipping go
vet for GN targets. This flag should not be used for anything outside
the go source tree.

Test: pprof patch succeeds building
Change-Id: I7c168ef3b166e1773aa368608485b48a2742a8c3
2 files changed