aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vet/main.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2017-03-02 09:04:03 -0800
committerJosh Bleecher Snyder <josharian@gmail.com>2017-03-02 18:43:23 +0000
commitddbee9abd45bbb955fec973fc0e395276127d431 (patch)
tree174b5f575057a2693a2385ef5213067c2b6ee1ba /src/cmd/vet/main.go
parent7e74d432915a8f22b07f8d29aa8e02245f8d8cd1 (diff)
downloadgo-ddbee9abd45bbb955fec973fc0e395276127d431.tar.gz
go-ddbee9abd45bbb955fec973fc0e395276127d431.zip
cmd/vet: support importing from source
Add a -source flag to cmd/vet that instructs it to typecheck purely from source code. Updates #16086 Fixes #19332 Change-Id: Ic83d0f14d5bb837a329d539b2873aeccdf7bf669 Reviewed-on: https://go-review.googlesource.com/37690 Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/cmd/vet/main.go')
-rw-r--r--src/cmd/vet/main.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/vet/main.go b/src/cmd/vet/main.go
index 3da0b3ccf5..ec4cb72797 100644
--- a/src/cmd/vet/main.go
+++ b/src/cmd/vet/main.go
@@ -25,6 +25,7 @@ import (
var (
verbose = flag.Bool("v", false, "verbose")
+ source = flag.Bool("source", false, "import from source instead of compiled object files")
tags = flag.String("tags", "", "space-separated list of build tags to apply when parsing")
tagList = []string{} // exploded version of tags flag; set in main
)