惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Martin Fowler
Martin Fowler
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
C
Check Point Blog
H
Help Net Security
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
P
Proofpoint News Feed
V
Visual Studio Blog
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
S
SegmentFault 最新的问题
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
有赞技术团队
有赞技术团队
博客园_首页
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏

博客园 - 咸着的鱼25

环境才是 Agent 的核心基础设施 OpenCode + OpenSpec + Oh-My-OpenCode 联合 SDD/ATDD 开发指南 AI 驱动开发工作流:OpenCode + Oh-My-OpenCode + SDD + ATDD 在线服务数据压缩算法比较 延迟深度链接 搭建wiki系统后端存储-来自大模型 广告投放名词 java spring IoC原理 面试题1 c++ 代码技巧 c++ 性能分析 粗排治理之性能优化 MMR 算法优化 core 基本操作 聊天室开发心得 Docker 学习笔记 Airflow 使用简介 修改系统参数 https学习笔记 openresty: nginx worker不同请求之间共享数据
lua转换etcd应答
咸着的鱼25 · 2017-07-17 · via 博客园 - 咸着的鱼25
local function decodeNodes(nodes)
    local table = {}
    for _, value in ipairs(nodes) do
        if value.nodes then
            table[value.key] = decodeNodes(value.nodes)
        elseif value.value then
            table[value.key] = value.value
        end
    end
    return table
end

local function decodeEtcdJson(rootValue, node)
    if node.nodes then
        rootValue[node.key] = decodeNodes(node.nodes)
    elseif node.value then
        rootValue[node.key] = node.value
    end
end

local function transferString2Boolean(s)
    if not s then
        return false
    elseif s == "true" then
        return true
    elseif s == "false" then
        return false
    end
    return true
end