diff options
author | Rob Pike <r@golang.org> | 2017-04-08 20:31:09 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2017-04-10 15:10:30 +0000 |
commit | 62aeb77764dcb5487e6557d207aa19879745e03e (patch) | |
tree | 430d5caf16f422654c365eeaae1bba4174896013 /src/cmd/vet/main.go | |
parent | 9ffd9339da503b50571ec6806e5d6d2cf5d5912a (diff) | |
download | go-62aeb77764dcb5487e6557d207aa19879745e03e.tar.gz go-62aeb77764dcb5487e6557d207aa19879745e03e.zip |
cmd/go: allow full flag processing in go vet
This allows the go tool to run "go vet" with both the build flags
that make sense, such as -x and -tags, and vet with all its flags.
To do this, create a new package cmd/go/internal/cmdflag to
hold functionality common to flag handling for test and vet.
Fixes #19350
RELNOTES=yes
Change-Id: Ia1ae213bd3f6cab1c5e492501c8d43ce61a7ee89
Reviewed-on: https://go-review.googlesource.com/40112
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/vet/main.go')
-rw-r--r-- | src/cmd/vet/main.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/vet/main.go b/src/cmd/vet/main.go index ec4cb72797..8c7b2be9c7 100644 --- a/src/cmd/vet/main.go +++ b/src/cmd/vet/main.go @@ -23,6 +23,8 @@ import ( "strings" ) +// Important! If you add flags here, make sure to update cmd/go/internal/vet/vetflag.go. + var ( verbose = flag.Bool("v", false, "verbose") source = flag.Bool("source", false, "import from source instead of compiled object files") |