crunchloop / crunchloop/devcontainer

config: add json struct tags to ResolvedConfig for stable CLI JSON output

未关闭
#77 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area/config enhancement
主要语言
Go
星标
5
派生
0
平均合并
6 小时 17 分钟
30 天内合并 PR
15

描述

\`config.ResolvedConfig\` has no \`json:\` struct tags, so \`encoding/json\` emits Go-PascalCase field names (\`DevcontainerID\`, \`Source\`, \`ContainerWorkspaceFolder\`, …).

That's fine when the library is embedded, but it makes \`devcontainer read-configuration\` output awkward for anyone piping into \`jq\` — and it's not a stable shape (a struct field rename silently changes the JSON key).

Add explicit \`json:\` tags using camelCase / spec-style names where the spec defines them (\`workspaceFolder\`, \`remoteUser\`, \`containerEnv\`, etc.), and our own conventions for fields not in the spec (\`devcontainerId\`, \`source\`, \`warnings\`).

Benefits:
- Stable CLI output shape, usable with \`jq\`
- Spec-aligned where it makes sense
- Cheaper for any future programmatic consumer

Worth verifying nothing else in the repo (tests, examples) depends on the current PascalCase JSON.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。