You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2020/10/16 07:16:19 UTC
[apisix] branch master updated: style: move localized require in
front of directives which calling it. (#2414)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 1afa8f7 style: move localized require in front of directives which calling it. (#2414)
1afa8f7 is described below
commit 1afa8f77272e6099d2c54e4f703f6a70adb16f72
Author: RocFang <fa...@gmail.com>
AuthorDate: Fri Oct 16 15:16:09 2020 +0800
style: move localized require in front of directives which calling it. (#2414)
---
apisix/admin/init.lua | 3 +--
apisix/admin/plugins.lua | 2 +-
apisix/debug.lua | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/apisix/admin/init.lua b/apisix/admin/init.lua
index 68f9233..5aaafa4 100644
--- a/apisix/admin/init.lua
+++ b/apisix/admin/init.lua
@@ -14,7 +14,7 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-
+local require = require
local core = require("apisix.core")
local route = require("resty.radixtree")
local plugin = require("apisix.plugin")
@@ -22,7 +22,6 @@ local ngx = ngx
local get_method = ngx.req.get_method
local tonumber = tonumber
local str_lower = string.lower
-local require = require
local reload_event = "/apisix/admin/plugins/reload"
local ipairs = ipairs
local events
diff --git a/apisix/admin/plugins.lua b/apisix/admin/plugins.lua
index 262b361..7cfe30e 100644
--- a/apisix/admin/plugins.lua
+++ b/apisix/admin/plugins.lua
@@ -14,13 +14,13 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
+local require = require
local core = require("apisix.core")
local local_plugins = require("apisix.plugin").plugins_hash
local stream_local_plugins = require("apisix.plugin").stream_plugins_hash
local pairs = pairs
local ipairs = ipairs
local pcall = pcall
-local require = require
local type = type
local table_remove = table.remove
local table_sort = table.sort
diff --git a/apisix/debug.lua b/apisix/debug.lua
index 7f458fe..b0ab038 100644
--- a/apisix/debug.lua
+++ b/apisix/debug.lua
@@ -14,6 +14,7 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
+local require = require
local yaml = require("tinyyaml")
local log = require("apisix.core.log")
local json = require("apisix.core.json")
@@ -25,7 +26,6 @@ local ngx = ngx
local re_find = ngx.re.find
local type = type
local pairs = pairs
-local require = require
local setmetatable = setmetatable
local pcall = pcall
local ipairs = ipairs