fix: conform to stricter printf usage in Go 1.24 (#16330)

This commit is contained in:
Mathias Fredriksson
2025-01-29 18:06:22 +02:00
committed by GitHub
parent 967a3810f4
commit 9520da338e
13 changed files with 22 additions and 22 deletions
+2 -2
View File
@@ -100,9 +100,9 @@ func (r *WorkspaceProxyReport) Run(ctx context.Context, opts *WorkspaceProxyRepo
for _, err := range errs {
switch r.Severity {
case health.SeverityWarning, health.SeverityOK:
r.Warnings = append(r.Warnings, health.Messagef(health.CodeProxyUnhealthy, err))
r.Warnings = append(r.Warnings, health.Messagef(health.CodeProxyUnhealthy, "%s", err))
case health.SeverityError:
r.appendError(*health.Errorf(health.CodeProxyUnhealthy, err))
r.appendError(*health.Errorf(health.CodeProxyUnhealthy, "%s", err))
}
}
}
+2 -2
View File
@@ -143,7 +143,7 @@ func TestWebsocketCloseMsg(t *testing.T) {
t.Parallel()
msg := strings.Repeat("d", 255)
trunc := httpapi.WebsocketCloseSprintf(msg)
trunc := httpapi.WebsocketCloseSprintf("%s", msg)
assert.Equal(t, len(trunc), 123)
})
@@ -151,7 +151,7 @@ func TestWebsocketCloseMsg(t *testing.T) {
t.Parallel()
msg := strings.Repeat("こんにちは", 10)
trunc := httpapi.WebsocketCloseSprintf(msg)
trunc := httpapi.WebsocketCloseSprintf("%s", msg)
assert.Equal(t, len(trunc), 123)
})
}