Hi all :
由于逻辑中存在call_func_array类似实现
所以在删除 table {1, nil, 2} 游标为1时 table.remove(args, 1) 结果并未按理想结果{nil, 2}返回而是{nil, nil, 2}
又不能直接使用 ngx.null 来代替,因为逻辑中已经存在比较多 not nil 判断改动比较多
所以实现了一段比较无奈的逻辑 如下
-- 伪代码
if table.maxn(#args) ~= #args then
-- for -> nil 2 ngx.null
-- table.remove(args, 1)
-- for -> ngx.null 2 nil
end
请问大家还有别的实现的方式么?