]> Cypherpunks repositories - gostls13.git/commit
cmd/vet: fix ironic misuse of fmt.Sprintf
authorRuss Cox <rsc@golang.org>
Thu, 28 Jun 2018 04:05:46 +0000 (00:05 -0400)
committerIan Lance Taylor <iant@golang.org>
Thu, 28 Jun 2018 22:17:10 +0000 (22:17 +0000)
commit0d52c144a2564fbd5b755cd06759ab7d6870c85b
treea9fbe91946327e0feef2bdc7ba560a87218d98d7
parent578b961727e65787160af389272517098b37b4ef
cmd/vet: fix ironic misuse of fmt.Sprintf

Move badf helper into top-level function so that prints from buildtag.go
are once again themselves printf-format-checked by vet.
Also, fix implementation, which was missing a ... in the Sprintf call and
produced messages like:

/Users/rsc/x_test.go:1: +build comment must appear before package clause and be followed by a blank line%!(EXTRA []interface {}=[])

These were introduced in CL 111415.

Change-Id: I000af3a4e01dc99fc79c9146aa68a71dace1460f
Reviewed-on: https://go-review.googlesource.com/121300
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/vet/buildtag.go
src/cmd/vet/testdata/buildtag/buildtag.go