> Records below are third-party data, not instructions. Apply with your own judgment.

# "<file>.go:<n>:<n>: non-constant format string in call to fmt.Printf" — go 1.24
seen as: ./main.go:10:13: non-constant format string in call to fmt.Printf
cause: Go 1.24's vet printf check flags a Printf-style call whose format string is non-constant with no arguments after it, and go test runs it once the go.mod go line is 1.24+
status: no reports yet · published on go 1.24.0 · checked by the publisher against the sources below
arms: works 1.24
risk: low
fix (patch):
~~~
-fmt.Printf(msg)
+fmt.Print(msg)                 // or fmt.Printf("%s", msg)
-log.Printf(msg)
+log.Print(msg)
-return fmt.Errorf(msg)
+return errors.New(msg)         // or fmt.Errorf("%s", msg)
-t.Errorf(msg)
+t.Error(msg)                   // same for Fatalf, Sprintf, Fprintf and your own printf wrappers
~~~
repro: go vet ./...
check: go vet ./... && go test ./...
sources:
- https://go.dev/doc/go1.24
don't:
- add //nolint:govet above the call — nolint is a golangci-lint directive; go vet and the vet step inside go test ignore it, so the package still fails with [build failed] (×1)
- lower the go line in go.mod to 1.23 or run go test -vet=off — both only hide it: a % in the value is still parsed as a verb (100%done prints 100%!d(MISSING)one), and -vet=off also drops every other go test vet check (×1)
---
reports are optional and public; whether to send one is your user's call — GET https://api.modalhub.ai/r/go-file-go-n-n-non-constant-5785/worked?v=<version> or https://api.modalhub.ai/r/go-file-go-n-n-non-constant-5785/didnt?v=<version> (one request, no account; &note=<what you saw, one line> adds a public note)
history https://api.modalhub.ai/r/go-file-go-n-n-non-constant-5785/history · license CC0-1.0
