printf: non-constant format string in call to (*github.com/kinbiko/jsonassert.Asserter).Assertf (govet)
ja.Assertf(
...
if format-like function is used without var args.
Since jsonasert only has Assertf(not Assert) it is also used if no arguments need to be passed govet warns for all such Assertf usages and I haven't find a way to configure govet/printf linter to ignore particular Assertf function.
Maybe correct way here is to have Assert function for such cases.
Thank you very much for reporting this. I'm sure to be bitten by this myself, so I'll consider adding it after I've had a chance to look into the govet issue myself.
What problem are you trying to solve?
It seems since go 1.23.0
go vet
has new warningif format-like function is used without var args.
Since jsonasert only has
Assertf
(notAssert
) it is also used if no arguments need to be passed govet warns for all such Assertf usages and I haven't find a way to configure govet/printf linter to ignore particularAssertf
function.Maybe correct way here is to have
Assert
function for such cases.