- Module github.com/eslider/go-config with env/yaml/json/ini packages - internal: source, keymap, merge, structconv, bytesutil - cmd/envc: convert, get, merge - docs/asr ASR-0001..0008, README/CHANGELOG/AGENTS refresh - golangci-lint v2 config; tests + fixtures Co-authored-by: Cursor <cursoragent@cursor.com>
732 B
732 B
ASR-0004: Configurable key normalization
Context
Real-world configuration mixes kebab-case, snake_case, SCREAMING_SNAKE, and struct field names. Requiring mapstructure tags on every field is noisy.
Decision
- After parsing and merging, codecs run
internal/keymap.Walkwith aNormalizer(defaultLowerAlnum: lowercase + strip non[a-z0-9]). - Callers may set
WithKeyNormalizer(nil)to disable walking, or supply a custom function.
Consequences
- POSIX env keys without
-still align with YAML keys that contain hyphens once normalized. - CLI
getapplies the same normalizer to each path segment for consistency.
Status
Accepted — 2026-05-02.
References
- ASR-0003