diff --git a/src/resty/aws/init.lua b/src/resty/aws/init.lua index 391171e..8422a52 100644 --- a/src/resty/aws/init.lua +++ b/src/resty/aws/init.lua @@ -15,7 +15,7 @@ local tablex = require("pl.tablex") local lookup_helper = function(self, key) -- signature to match __index meta-method if type(key) == "string" then local lckey = key:lower() - for k,v in pairs(self) do + for k in pairs(self) do if type(k) == "string" and k:lower() == lckey then error(("key '%s' not found, did you mean '%s'?"):format(key, k), 2) end @@ -193,7 +193,7 @@ do -- @param service service-instance being created; field `aws` is the aws instance, -- `config` is the service instance config, `api` the service api. function AWS.configureEndpoint(service) - for i, key in ipairs(derivedKeys(service)) do + for _, key in ipairs(derivedKeys(service)) do local region_rule_config = aws_config.region.rules[key] --> contains regions templates if type(region_rule_config) == 'string' then diff --git a/src/resty/aws/request/validate.lua b/src/resty/aws/request/validate.lua index 6cfbab7..5b0ec14 100644 --- a/src/resty/aws/request/validate.lua +++ b/src/resty/aws/request/validate.lua @@ -441,7 +441,7 @@ local validators do local list_checks do local function get_length(t) -- gets length of an array (with holes) local size = 0 - for k,v in pairs(t) do + for k in pairs(t) do if type(k) ~= "number" then return nil, "list contains non-numeric indices" end