]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/vet: refer info about -printfuncs to the -printf flag
authorRob Pike <r@golang.org>
Mon, 22 Jun 2015 20:12:11 +0000 (06:12 +1000)
committerRob Pike <r@golang.org>
Mon, 22 Jun 2015 20:42:01 +0000 (20:42 +0000)
And vice versa.

The flags are tightly coupled so make the connection clear.

Change-Id: I505f76be631ffa6e489a441c2f3c717aa09ec802
Reviewed-on: https://go-review.googlesource.com/11324
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/cmd/vet/doc.go

index a19de3fac3a09962f48243b47a801283835bb115..ea4654ae5fff8236a99b16585f40dd3976bc73fe 100644 (file)
@@ -50,6 +50,7 @@ with these names, disregarding case:
        Fatal Fatalf
        Log Logf
        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
 a format descriptor string in the manner of fmt.Printf. If not, vet
 complains about arguments that look like format descriptor strings.
@@ -174,14 +175,14 @@ These flags configure the behavior of vet:
        -v
                Verbose mode
        -printfuncs
-               A comma-separated list of print-like functions to supplement
-               the standard list.  Each entry is in the form Name:N where N
-               is the zero-based argument position of the first argument
-               involved in the print: either the format or the first print
-               argument for non-formatted prints.  For example,
-               if you have Warn and Warnf functions that take an
-               io.Writer as their first argument, like Fprintf,
+               A comma-separated list of print-like functions to supplement the
+               standard list.  Each entry is in the form Name:N where N is the
+               zero-based argument position of the first argument involved in the
+               print: either the format or the first print argument for non-formatted
+               prints.  For example, if you have Warn and Warnf functions that
+               take an io.Writer as their first argument, like Fprintf,
                        -printfuncs=Warn:1,Warnf:1
+               For more information, see the discussion of the -printf flag.
        -shadowstrict
                Whether to be strict about shadowing; can be noisy.
        -test