crunchloop / crunchloop/devcontainer
config: add json struct tags to ResolvedConfig for stable CLI JSON output
- Langage dominant
- Go
- Étoiles
- 5
- Forks
- 0
- Merge moyen
- 6 h 17 min
- PR mergées (30 j)
- 15
Description
\`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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Repérez config.ResolvedConfig et examinez la commande read-configuration pour voir comment encoding/json expose actuellement ses champs. Recherchez dans les tests et les exemples du dépôt des clés JSON en PascalCase, puis vérifiez que la sortie utilise les noms demandés en camelCase ou dans le style de la spec sans rompre les attentes existantes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- go
- Domaine
- cli
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 68/100