mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 20:23:39 +09:00
style(backups): clear staticcheck findings in overlapping controllers
Drop a field-manager constant nothing uses in the MariaDB driver, switch on the MongoDB operator's state as a tagged switch, and reword the error strings of the MongoDB driver and the workload monitor so they do not start with a capital. The errors keep their meaning and nothing matches their text. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
3 files changed
+9
-11
No files matched your search
@@ -528,7 +528,7 @@ func (r *WorkloadMonitorReconciler) queryAllBucketMetrics(ctx context.Context, p
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, fmt.Errorf("Prometheus returned status %d", resp.StatusCode)
|
||||
return nil, fmt.Errorf("unexpected status %d from Prometheus", resp.StatusCode)
|
||||
}
|
||||
|
||||
body, err := io.ReadAll(io.LimitReader(resp.Body, 4<<20))
|
||||
@@ -549,7 +549,7 @@ func (r *WorkloadMonitorReconciler) queryAllBucketMetrics(ctx context.Context, p
|
||||
return nil, fmt.Errorf("parsing Prometheus response: %w", err)
|
||||
}
|
||||
if promResp.Status != "success" {
|
||||
return nil, fmt.Errorf("Prometheus query finished with status %q", promResp.Status)
|
||||
return nil, fmt.Errorf("the Prometheus query finished with status %q", promResp.Status)
|
||||
}
|
||||
|
||||
for _, r := range promResp.Data.Result {
|
||||
|
||||
Reference in new issue
Block a user