From 76de685e84fa57611daee27b75c53b1e0648cdb7 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Mon, 27 Jun 2022 21:26:16 +0800 Subject: [PATCH] localize string.format --- lib/resty/healthcheck.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/resty/healthcheck.lua b/lib/resty/healthcheck.lua index d0215be6..10265c22 100644 --- a/lib/resty/healthcheck.lua +++ b/lib/resty/healthcheck.lua @@ -32,6 +32,7 @@ local tostring = tostring local ipairs = ipairs local table_insert = table.insert local table_remove = table.remove +local string_format = string.format local resty_lock = require ("resty.lock") local re_find = ngx.re.find local bit = require("bit") @@ -240,7 +241,7 @@ local deserialize = codec.decode local function key_for(key_prefix, ip, port, hostname) - return string.format("%s:%s:%s%s", key_prefix, ip, port, hostname and ":" .. hostname or "") + return string_format("%s:%s:%s%s", key_prefix, ip, port, hostname and ":" .. hostname or "") end