Skip to content

Commit

Permalink
fix(logp): TestConfigureWithCore fails with Go 1.24
Browse files Browse the repository at this point in the history
The cmd/vet in Go 1.24 reports printf calls with non-const format and no
args, causing one test in logp to fail.

See golang/go#60529.

```
$ go install golang.org/dl/gotip@latest
$ gotip download
$ gotip test ./logp -count=1
logp/core_test.go:714:7: non-constant format string in call to github.com/elastic/elastic-agent-libs/logp.Info
FAIL    github.com/elastic/elastic-agent-libs/logp [build failed]
```
  • Loading branch information
mauri870 committed Oct 1, 2024
1 parent 6c381fb commit 655adc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logp/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ func TestConfigureWithCore(t *testing.T) {
if err != nil {
t.Fatalf("Unexpected err: %s", err)
}
Info(testMsg)
Info("The quick brown %s jumped over the lazy %s.", "fox", "dog")
var r map[string]interface{}

err = json.Unmarshal(b.Bytes(), &r)
Expand Down

0 comments on commit 655adc3

Please sign in to comment.