mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: conform to stricter printf usage in Go 1.24 (#16330)
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user