Documentation Clarification
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 48/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- lua
调研方向
从 resty.random.bytes() 的文档示例开始,检查该函数针对密码学强输出所记录的返回行为。确认 nil 是否可能是返回结果,然后更新示例或其说明,使重试循环准确反映 API。
由索引模型根据 Issue 内容生成。
描述
@agentzh
The example documentation for resty.random.bytes() contains a while loop. Is there a situation where resty.random.bytes() can return nil, or is this an error in the documentation?
local resty_random = require "resty.random"
local str = require "resty.string"
local strong_random = resty_random.bytes(16,true)
-- attempt to generate 16 bytes of
-- cryptographically strong random data
while strong_random == nil do
strong_random = resty_random.bytes(16,true)
end
ngx.say("random: ", str.to_hex(strong_random))
- 主要语言
- Lua
- 星标
- 443
- 派生
- 143
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openresty/lua-resty-string 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
openresty/lua-resty-string#109 ·
-
难度 4/5 3-5 天 新手友好度 20/100
openresty/lua-resty-string#95 · 2 条评论 ·
-
难度 3/5 1-2 天 新手友好度 30/100
openresty/lua-resty-string#92 · 4 条评论 ·
-
难度 5/5 一周以上 新手友好度 20/100
openresty/lua-resty-string#91 · 4 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 25/100
openresty/lua-resty-string#90 · 1 条评论 ·
查看 openresty/lua-resty-string 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 85/100
codymikol/multiverse.nvim#330 ·
维护者通常 8 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
-
Mosquito needs triage
难度 1/5 1 小时以内 新手友好度 91/100
DCS-Skunkworks/dcs-bios#1919 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 1 天内回复
-
import-issue
难度 2/5 1-3 小时 新手友好度 62/100
public-transport/transitous#2519 ·
维护者通常 1 天内回复