Skip to content

Commit

Permalink
Address linter issues on older goangci linter for backport
Browse files Browse the repository at this point in the history
This commit addresses some further linter issues along the
same pattern as the prior commit. These are introduced as the
linter version upstream is ahead and these errors are no longer
an issue.

Signed-off-by: Shyamsundar Ranganathan <[email protected]>
  • Loading branch information
ShyamsundarR committed Dec 26, 2024
1 parent 085b8c1 commit b6b9ca5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/controller/util/json_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ func getMatchingPods(pList *corev1.PodList, re *regexp.Regexp) []client.Object {

for _, pod := range pList.Items {
if re.MatchString(pod.Name) {
objs = append(objs, &pod)
podCopy := pod
objs = append(objs, &podCopy)
}
}

Expand All @@ -253,7 +254,8 @@ func getMatchingDeployments(dList *appsv1.DeploymentList, re *regexp.Regexp) []c

for _, pod := range dList.Items {
if re.MatchString(pod.Name) {
objs = append(objs, &pod)
podCopy := pod
objs = append(objs, &podCopy)
}
}

Expand All @@ -265,7 +267,8 @@ func getMatchingStatefulSets(ssList *appsv1.StatefulSetList, re *regexp.Regexp)

for _, pod := range ssList.Items {
if re.MatchString(pod.Name) {
objs = append(objs, &pod)
podCopy := pod
objs = append(objs, &podCopy)
}
}

Expand Down

0 comments on commit b6b9ca5

Please sign in to comment.