upstream-hash-by annotation support for dynamic configuraton mode

This commit is contained in:
Elvin Efendi 2018-04-19 23:02:22 -04:00
parent 0813b38314
commit 2ce9196ecf
7 changed files with 174 additions and 3 deletions

View file

@ -1,6 +1,17 @@
local _M = {}
local string_len = string.len
function _M.split_pair(pair, seperator)
local i = pair:find(seperator)
if i == nil then
return pair, nil
else
local name = pair:sub(1, i - 1)
local value = pair:sub(i + 1, -1)
return name, value
end
end
-- this implementation is taken from
-- https://web.archive.org/web/20131225070434/http://snippets.luacode.org/snippets/Deep_Comparison_of_Two_Values_3
-- and modified for use in this project