feat: link diff and confirm (#1635)

This commit is contained in:
yetone
2025-03-19 03:09:30 +08:00
committed by GitHub
parent 20fea1e717
commit 0786499712
3 changed files with 43 additions and 9 deletions

View File

@@ -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