]> Cypherpunks repositories - gostls13.git/commit
cmd/vet: improve detecting printf-like format argument
authorAliaksandr Valialkin <valyala@gmail.com>
Tue, 22 Mar 2016 13:38:21 +0000 (15:38 +0200)
committerRob Pike <r@golang.org>
Tue, 29 Mar 2016 23:40:52 +0000 (23:40 +0000)
commitee1b90ad2c3cc97215c0f38f70e62396856eb0f2
tree174c631c8337a263ee72eb773bcb8e0aaf058a7b
parent12fb62a57db6a34c4ba0162ac970724d60dbbfbb
cmd/vet: improve detecting printf-like format argument

Previously format argument was detected via scanning func type args.
This didn't work when func type couldn't be determined if the func
is declared in the external package. Fall back to scanning for
the first string call argument in this case.

Fixes #14754

Change-Id: I571cc29684cc641bc87882002ef474cf1481e9e2
Reviewed-on: https://go-review.googlesource.com/21023
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/vet/print.go
src/cmd/vet/testdata/print.go