zhixiongdu027 commented on a change in pull request #4880: URL: https://github.com/apache/apisix/pull/4880#discussion_r802187707
########## File path: apisix/discovery/kubernetes/informer_factory.lua ########## @@ -152,48 +152,47 @@ local function split_event (body, dispatch_event) remainder_body = string.sub(body, captured_size + 1) end - return remainder_body, "Success", nil + return remainder_body, "Success" Review comment: ```lua remainder_body, reason, err = split_event(body, dispatch_event, informer) if reason ~= "Success" then if reason == "ResourceGone" then return true end return false, reason, err end ``` "Success" makes sense here because the code above will use it. If there is no "Success", how can only use remain_body is nil as a detection method, I think this is not a good code style -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org