Commit b625810d authored by Tormod Erevik Lea's avatar Tormod Erevik Lea Committed by Rob Pike

cmd/vet: hard-code program name in usage message

Example on linux_amd64 for 'go tool vet -h':

Before:
	Usage of /usr/local/go/pkg/tool/linux_amd64/vet:
After:
	Usage of vet:

Change-Id: I11cb16b656bd097062d57a8c7441fbe66caaef78
Reviewed-on: https://go-review.googlesource.com/29294Reviewed-by: default avatarRob Pike <r@golang.org>
parent 3cca0692
......@@ -161,7 +161,7 @@ func register(name, usage string, fn func(*File, ast.Node), types ...ast.Node) {
// Usage is a replacement usage function for the flags package.
func Usage() {
fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
fmt.Fprintf(os.Stderr, "Usage of vet:\n")
fmt.Fprintf(os.Stderr, "\tvet [flags] directory...\n")
fmt.Fprintf(os.Stderr, "\tvet [flags] files... # Must be a single package\n")
fmt.Fprintf(os.Stderr, "By default, -all is set and all non-experimental checks are run.\n")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment