• Russ Cox's avatar
    cmd/vet: fix ironic misuse of fmt.Sprintf · 0d52c144
    Russ Cox authored
    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: 's avatarRob Pike <r@golang.org>
    0d52c144
buildtag.go 3.22 KB