Skip to content

Commit

Permalink
fix(policy): Merge variable declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
b0m313 committed Dec 14, 2023
1 parent 4345b7c commit 7feb25e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Nimbus/controllers/policy/network_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ func (npc *NetworkPolicyController) HandlePolicy(ctx context.Context, bindingInf
// DeletePolicy removes the network policy associated with the SecurityIntent resource.
func (npc *NetworkPolicyController) DeletePolicy(ctx context.Context, bindingInfo *general.BindingInfo) error {
log := log.FromContext(ctx)
var err error

err = utils.DeletePolicy(ctx, npc.Client, "CiliumNetworkPolicy", bindingInfo.Binding.Name, bindingInfo.Binding.Namespace)
// Modified line: Merged variable declaration with assignment
err := utils.DeletePolicy(ctx, npc.Client, "CiliumNetworkPolicy", bindingInfo.Binding.Name, bindingInfo.Binding.Namespace)
if err != nil {
log.Error(err, "Failed to delete Cilium Network Policy", "Name", bindingInfo.Binding.Name)
return err
Expand Down

0 comments on commit 7feb25e

Please sign in to comment.