feat: link diff and confirm (#1635)
This commit is contained in:
@@ -1169,4 +1169,14 @@ function M.parse_iso8601_date(iso_str)
|
||||
return tostring(os.date("%Y-%m-%d %H:%M:%S", timestamp)), nil
|
||||
end
|
||||
|
||||
function M.random_string(length)
|
||||
local charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||
local result = {}
|
||||
for _ = 1, length do
|
||||
local rand = math.random(1, #charset)
|
||||
table.insert(result, charset:sub(rand, rand))
|
||||
end
|
||||
return table.concat(result)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user