From 99b2a93e1f84a3dfa8da651b94e2e176187fc2a9 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 3 Dec 2018 11:35:20 -0800 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Alan Donovan --- go/analysis/unitchecker/unitchecker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/analysis/unitchecker/unitchecker.go b/go/analysis/unitchecker/unitchecker.go index 59489f92da..ec3103b27e 100644 --- a/go/analysis/unitchecker/unitchecker.go +++ b/go/analysis/unitchecker/unitchecker.go @@ -112,7 +112,7 @@ Usage of %[1]s: os.Exit(0) } 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) }