Skip to content

Commit ada8889

Browse files
fixed linter issues
1 parent c1a6db9 commit ada8889

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

cloudprofilesync/source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type OCIParams struct {
4040
Registry string `json:"registry"`
4141
Repository string `json:"repository"`
4242
Username string `json:"username"`
43-
Password string `json:"password"`
43+
Password string `json:"password"` //nolint:gosec
4444
Parallel int64 `json:"parallel"`
4545
}
4646

controllers/managedcloudprofile_controller.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
106106
Parallel: 1,
107107
}, updates.Source.OCI.Insecure)
108108
if err != nil {
109-
return ctrl.Result{}, fmt.Errorf("failed to initialize oci source for garbage collection: %w", err)
109+
return ctrl.Result{}, fmt.Errorf("failed to initialize OCI source for garbage collection: %w", err)
110110
}
111111
source = oci
112112
default:
@@ -163,14 +163,14 @@ func (r *Reconciler) deleteVersion(ctx context.Context, cloudProfileName, imageN
163163
if cfg.MachineImages[i].Name != imageName {
164164
continue
165165
}
166-
new := make([]providercfg.MachineImageVersion, 0, len(cfg.MachineImages[i].Versions))
166+
filtered := make([]providercfg.MachineImageVersion, 0, len(cfg.MachineImages[i].Versions))
167167
for _, mv := range cfg.MachineImages[i].Versions {
168168
if strings.HasSuffix(mv.Image, ":"+version) {
169169
continue
170170
}
171-
new = append(new, mv)
171+
filtered = append(filtered, mv)
172172
}
173-
cfg.MachineImages[i].Versions = new
173+
cfg.MachineImages[i].Versions = filtered
174174
}
175175
raw, err := json.Marshal(cfg)
176176
if err == nil {

0 commit comments

Comments
 (0)