Skip to content

Commit

Permalink
util: correcting lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Annaraya Narasagond <[email protected]>
  • Loading branch information
asn1809 committed Dec 11, 2024
1 parent bf17818 commit 93c0b32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/controller/util/json_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func getResourcesUsingLabelSelector(c client.Client, hook *kubeobjects.HookSpec,
objList client.ObjectList,
) ([]client.Object, error) {
filteredObjs := make([]client.Object, 0)
selector, err := metav1.LabelSelectorAsSelector(hook.LabelSelector)

selector, err := metav1.LabelSelectorAsSelector(hook.LabelSelector)
if err != nil {
return filteredObjs, fmt.Errorf("error during labelSelector to selector conversion")
}
Expand Down Expand Up @@ -165,8 +165,8 @@ func getResourcesUsingNameSelector(c client.Client, hook *kubeobjects.HookSpec,
"metadata.name": hook.NameSelector, // needs exact matching with the name
}),
}
err = c.List(context.Background(), objList, listOps)

err = c.List(context.Background(), objList, listOps)
if err != nil {
return filteredObjs, err
}
Expand All @@ -177,8 +177,8 @@ func getResourcesUsingNameSelector(c client.Client, hook *kubeobjects.HookSpec,
listOps := &client.ListOptions{
Namespace: hook.Namespace,
}
re, err := regexp.Compile(hook.NameSelector)

re, err := regexp.Compile(hook.NameSelector)
if err != nil {
return filteredObjs, err
}
Expand Down

0 comments on commit 93c0b32

Please sign in to comment.