Skip to content

Commit

Permalink
Fix linter loopvar (#8387)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuriy Losev <[email protected]>
  • Loading branch information
yalosev authored May 14, 2024
1 parent 983f647 commit f38f918
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ func (c *moduleReleaseReconciler) reconcilePendingRelease(ctx context.Context, m

pointerReleases := make([]*v1alpha1.ModuleRelease, 0, len(otherReleases.Items))
for _, r := range otherReleases.Items {
r := r // The copy of the 'for' variable "r" can be deleted (Go 1.22+)
pointerReleases = append(pointerReleases, &r)
}
releaseUpdater.PrepareReleases(pointerReleases)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ func (c *moduleSourceReconciler) getReleasePolicy(sourceName, moduleName string,
var found bool

for _, policy := range policies {
policy := policy // The copy of the 'for' variable "policy" can be deleted (Go 1.22+)
if policy.Spec.ModuleReleaseSelector.LabelSelector != nil {
selector, err := metav1.LabelSelectorAsSelector(policy.Spec.ModuleReleaseSelector.LabelSelector)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion modules/040-node-manager/hooks/handle_node_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ func fixMasterTaints(nodeTaints []v1.Taint, ngTaints []v1.Taint) []v1.Taint {

nodeTaintsMap := make(map[string]*v1.Taint, len(nodeTaints))
for _, sourceTaint := range nodeTaints {
sourceTaint := sourceTaint // The copy of the 'for' variable "sourceTaint" can be deleted (Go 1.22+)
nodeTaintsMap[sourceTaint.Key] = &sourceTaint
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ func generateProxyAuthCert(input *go_hook.HookInput, dc dependency.Container) er
var crowdConfig *provider

for _, prov := range providers {
prov := prov // The copy of the 'for' variable "prov" can be deleted (Go 1.22+)
if prov.Typ == "Crowd" && prov.Crowd.EnableBasicAuth {
if crowdConfig != nil {
return errors.New("only one enableBasicAuth must be enabled for Crowd")
Expand Down

0 comments on commit f38f918

Please sign in to comment.