mirror of
https://github.com/golang/go
synced 2024-10-01 01:18:32 -06:00
go/analysis/unitchecker: improve error message for go tool vet
Previously running "go tool vet" said vet: invalid command: want .cfg file (this reduced version of vet is intended to be run only by the 'go vet' command) With this change it says: vet: invoking "go tool vet" directly is unsupported; use "go vet" Updates golang/go#28869 Change-Id: I603ab2f75bb52d860e5cd7466e89d051dfbf3f08 Reviewed-on: https://go-review.googlesource.com/c/152217 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
ee45598d2f
commit
99b2a93e1f
@ -112,7 +112,7 @@ Usage of %[1]s:
|
|||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
if len(args) != 1 || !strings.HasSuffix(args[0], ".cfg") {
|
if len(args) != 1 || !strings.HasSuffix(args[0], ".cfg") {
|
||||||
log.Fatalf("invalid command: want .cfg file (this reduced version of %s is intended to be run only by the 'go vet' command)", progname)
|
log.Fatalf(`invoking "go tool vet" directly is unsupported; use "go vet"`)
|
||||||
}
|
}
|
||||||
Run(args[0], analyzers)
|
Run(args[0], analyzers)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user