You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/12/10 13:19:48 UTC

[GitHub] [apisix] diaosj opened a new pull request #3015: miscellaneous: local var [http_statuses] redefined in apisix/init.lua

diaosj opened a new pull request #3015:
URL: https://github.com/apache/apisix/pull/3015


   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   Just an issue about code style. Local variable `http_statuses` was defined at line 686 (https://github.com/apache/apisix/blob/master/apisix/init.lua#L686) and renamed at line (https://github.com/apache/apisix/blob/master/apisix/init.lua#L701). 
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   * [ - ] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ - ] Have you added corresponding test cases?
   * [ - ] Have you modified the corresponding document?
   * [ - ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] diaosj commented on a change in pull request #3015: style: local var [http_statuses] redefined in apisix/init.lua

Posted by GitBox <gi...@apache.org>.
diaosj commented on a change in pull request #3015:
URL: https://github.com/apache/apisix/pull/3015#discussion_r540669132



##########
File path: apisix/init.lua
##########
@@ -698,8 +698,8 @@ local function healcheck_passive(api_ctx)
         end
     end
 
-    local http_statuses = passive and passive.unhealthy and
-                          passive.unhealthy.http_statuses
+    http_statuses = passive and passive.unhealthy and
+            passive.unhealthy.http_statuses

Review comment:
       ok. Got it.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #3015: style: local var [http_statuses] redefined in apisix/init.lua

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #3015:
URL: https://github.com/apache/apisix/pull/3015#discussion_r540646387



##########
File path: apisix/init.lua
##########
@@ -698,8 +698,8 @@ local function healcheck_passive(api_ctx)
         end
     end
 
-    local http_statuses = passive and passive.unhealthy and
-                          passive.unhealthy.http_statuses
+    http_statuses = passive and passive.unhealthy and
+            passive.unhealthy.http_statuses

Review comment:
       Err. It would be better if the `passive` can be aligned with the `= passive` in the previous line, just like the state before your change.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #3015: style: local var [http_statuses] redefined in apisix/init.lua

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #3015:
URL: https://github.com/apache/apisix/pull/3015#discussion_r540610120



##########
File path: apisix/init.lua
##########
@@ -698,7 +698,7 @@ local function healcheck_passive(api_ctx)
         end
     end
 
-    local http_statuses = passive and passive.unhealthy and
+    http_statuses = passive and passive.unhealthy and
                           passive.unhealthy.http_statuses

Review comment:
       Please update the indentation.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #3015: style: local var [http_statuses] redefined in apisix/init.lua

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #3015:
URL: https://github.com/apache/apisix/pull/3015


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org