Fix up linting issue

Fix `govet` linting issue: `printf: non-constant format string`.

Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
SuperQ 2024-08-21 14:08:59 +02:00
parent 17afd4c021
commit e2c4e1e5cf
No known key found for this signature in database
GPG Key ID: C646B23C9E3245F1

View File

@ -213,7 +213,7 @@ func TestAlertsPut(t *testing.T) {
}
if !alertsEqual(res, a) {
t.Errorf("Unexpected alert: %d", i)
t.Fatalf(pretty.Compare(res, a))
t.Fatal(pretty.Compare(res, a))
}
}
}
@ -294,7 +294,7 @@ func TestAlertsSubscribe(t *testing.T) {
close(fatalc)
fatal, ok := <-fatalc
if ok {
t.Fatalf(fatal)
t.Fatal(fatal)
}
}
@ -318,7 +318,7 @@ func TestAlertsGetPending(t *testing.T) {
expected := expectedAlerts[actual.Fingerprint()]
if !alertsEqual(actual, expected) {
t.Errorf("Unexpected alert")
t.Fatalf(pretty.Compare(actual, expected))
t.Fatal(pretty.Compare(actual, expected))
}
}
@ -336,7 +336,7 @@ func TestAlertsGetPending(t *testing.T) {
expected := expectedAlerts[actual.Fingerprint()]
if !alertsEqual(actual, expected) {
t.Errorf("Unexpected alert")
t.Fatalf(pretty.Compare(actual, expected))
t.Fatal(pretty.Compare(actual, expected))
}
}
}
@ -425,7 +425,7 @@ func TestAlertsStoreCallback(t *testing.T) {
}
if !alertsEqual(a, &alert1Mod) {
t.Errorf("Unexpected alert")
t.Fatalf(pretty.Compare(a, &alert1Mod))
t.Fatal(pretty.Compare(a, &alert1Mod))
}
// Now wait until existing alerts are GC-ed, and make sure that callback was called.