Commit 98c9e9e7 authored by Rob Pike's avatar Rob Pike

cmd/vet: refer info about -printfuncs to the -printf flag

And vice versa.

The flags are tightly coupled so make the connection clear.

Change-Id: I505f76be631ffa6e489a441c2f3c717aa09ec802
Reviewed-on: https://go-review.googlesource.com/11324Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
parent 1ab9176e
...@@ -50,6 +50,7 @@ with these names, disregarding case: ...@@ -50,6 +50,7 @@ with these names, disregarding case:
Fatal Fatalf Fatal Fatalf
Log Logf Log Logf
Panic Panicf Panicln Panic Panicf Panicln
The -printfuncs flag can be used to redefine this list.
If the function name ends with an 'f', the function is assumed to take If the function name ends with an 'f', the function is assumed to take
a format descriptor string in the manner of fmt.Printf. If not, vet a format descriptor string in the manner of fmt.Printf. If not, vet
complains about arguments that look like format descriptor strings. complains about arguments that look like format descriptor strings.
...@@ -174,14 +175,14 @@ These flags configure the behavior of vet: ...@@ -174,14 +175,14 @@ These flags configure the behavior of vet:
-v -v
Verbose mode Verbose mode
-printfuncs -printfuncs
A comma-separated list of print-like functions to supplement A comma-separated list of print-like functions to supplement the
the standard list. Each entry is in the form Name:N where N standard list. Each entry is in the form Name:N where N is the
is the zero-based argument position of the first argument zero-based argument position of the first argument involved in the
involved in the print: either the format or the first print print: either the format or the first print argument for non-formatted
argument for non-formatted prints. For example, prints. For example, if you have Warn and Warnf functions that
if you have Warn and Warnf functions that take an take an io.Writer as their first argument, like Fprintf,
io.Writer as their first argument, like Fprintf,
-printfuncs=Warn:1,Warnf:1 -printfuncs=Warn:1,Warnf:1
For more information, see the discussion of the -printf flag.
-shadowstrict -shadowstrict
Whether to be strict about shadowing; can be noisy. Whether to be strict about shadowing; can be noisy.
-test -test
......
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