mirror of
https://github.com/golang/go
synced 2024-11-18 15:54:42 -07:00
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/29294 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
3cca069220
commit
b625810d28
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user