Closed as not planned
Closed as not planned
Description
Go version
go1.23, go1.22, tip
Output of go env
in your module/workspace:
N/A (repro in playground)
What did you do?
I wrote a function which takes optional args of type any
; if the first optional arg is of type string
, it is passed to fmt.Sprintf
as the format.
The vet check believes I'm incorrectly providing a format specifier; until I found a way to defeat the check, it prevented any tests within the package from running.
https://go.dev/play/p/b6AupyJEr6s
printf analyzer documentation is available on pkg.go.dev
What did you see happen?
The printf checker produces a false positive, and there doesn't seem to be a way to disable it. I was unable to run any tests in the affected package until I found a way to defeat the checker.
What did you expect to see?
go test
and the playground compile and execute the code.