• Russ Cox's avatar
    cmd/vet: report uncalled functions in Printf %v · 0f89efa2
    Russ Cox authored
    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: 's avatarRob Pike <r@golang.org>
    0f89efa2
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
newlink Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...
yacc Loading commit data...