crunchloop / crunchloop/devcontainer

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

オープン
#77 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area/config enhancement
主要言語
Go
スター
5
フォーク
0
平均マージ
6時間 17分
マージ済み PR(30日)
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 を短くまとめたダイジェスト。