diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-05 19:45:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-05 19:45:04 +0100 |
commit | 18e4a975983c7f61134c02d414170af678308bcb (patch) | |
tree | 8de52e7eb387fb9dbc00733b6b16616d92640cc3 /lualib/lua_util.lua | |
parent | 04c2886544ca562a0b9154974ecc491d14e0fba6 (diff) | |
parent | c04808c938e2a3deb0e9b43e3ae0af915d1d561d (diff) | |
download | rspamd-18e4a975983c7f61134c02d414170af678308bcb.tar.gz rspamd-18e4a975983c7f61134c02d414170af678308bcb.zip |
Merge pull request #4562 from helsinki-systems/fix/redis_schema_parsing
[Fix] Redis schema parsing
Diffstat (limited to 'lualib/lua_util.lua')
-rw-r--r-- | lualib/lua_util.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua index c2bdf40a9..289e2ed3a 100644 --- a/lualib/lua_util.lua +++ b/lualib/lua_util.lua @@ -619,6 +619,19 @@ end exports.table_cmp = table_cmp --[[[ +-- @function lua_util.table_merge(t1, t2) +-- Merge two tables +--]] +local function table_merge(t1, t2) + for k, v in pairs(t2) do + t1[k] = v + end + return t1 +end + +exports.table_merge = table_merge + +--[[[ -- @function lua_util.table_cmp(task, name, value, stop_chars) -- Performs header folding --]] |