Kong / gateway-operator

Kubernetes Operator for Kong Gateways
Apache License 2.0
52 stars 15 forks source link

chore: use IsZero() for ctr.Result to make check #662

Closed programmer04 closed 1 month ago

programmer04 commented 1 month ago

What this PR does / why we need it

During the review of https://github.com/Kong/gateway-operator/pull/476 @pmalek mentioned that for ctrl.Result not only the field Requeue but also RequeueAfter indicates a need of requeue see https://github.com/Kong/gateway-operator/pull/476#discussion_r1771453386. This PR ensures that both fields are checked in all cases with a built-in method IsZero().

Which issue this PR fixes

Spotted during the review of PR for the issue https://github.com/Kong/gateway-operator/issues/380