mirror of
https://github.com/golang/go
synced 2024-11-08 12:06:18 -07:00
0f89efa255
Given, say, var f *os.File, a new vet check in CL 14122 diagnoses: fmt.Printf("%s\n", f.Name) fmt.Println(f.Name) but not fmt.Printf("%v\n", f.Name) In all three cases the error is that the argument should be f.Name(). Diagnosing Println but not Printf %v seems oddly inconsistent, so I changed %v to have the check too. In fact, all verbs now have the check except %p and %T. Fixes Dave Cheney's confusion when trying to write an example of the new vet check advertised in the Go 1.6 release notes. Change-Id: I92fa6a7a1d5d9339a6a59ae4e587a254e633f500 Reviewed-on: https://go-review.googlesource.com/19101 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Rob Pike <r@golang.org> |
||
---|---|---|
.. | ||
internal/whitelist | ||
testdata | ||
asmdecl.go | ||
assign.go | ||
atomic.go | ||
bool.go | ||
buildtag.go | ||
cgo.go | ||
composite.go | ||
copylock.go | ||
deadcode.go | ||
doc.go | ||
example.go | ||
main.go | ||
method.go | ||
nilfunc.go | ||
print.go | ||
rangeloop.go | ||
shadow.go | ||
shift.go | ||
structtag.go | ||
types.go | ||
unsafeptr.go | ||
unused.go | ||
vet_test.go |