Repository navigation
v0.10.0
Immutable
release. Only release title and notes can be modified.
CONGA v0.10.0 simplifies typed map binding—eliminating App.RegisterMap—and tightens startup validation across map types, config environment variables, boolean struct tags, and conga-lint diagnostics.
🚀 Highlights
- Zero-registration typed maps: Typed maps now bind automatically without
App.RegisterMapand parse keys and values through registeredTypeParsers, including maps keyed or valued by named string types. Slice- and map-kind types with their own text unmarshaler, such asnet.IP, bind as one value, and a missing parser fails at startup (#210, #215). - Safer config-variable reservation: Apps reserve
<PREFIX>_CONFIGonly when they register a config decoder or declare aConfigFilefield, and both runtime schema build andconga-lintcatch flags or features bound to that variable at startup (#214, #216). - Strict boolean tags & unified schema diagnostics:
hidden,negatable, andbootstrapreject misspelled tag values at startup (#212), andconga-lintshares exact schema error formatting with the runtime (#211).
⚠ Breaking Changes & Migration
API changes
App.RegisterMapremoved;RegisterTyperejects slices and maps (#210, closes #121, #113):- Delete
app.RegisterMap(...)calls—typed maps now bind automatically. - Move any predictor previously passed to
RegisterMaponto apredictor:"<name>"struct tag paired withapp.Predictor("<name>", p), or implement aPredictmethod on a named map type. App.RegisterTypenow panics for slice and map types; register aTypeParserfor the element or value type instead.
- Delete
Schema & startup guards
- Config environment variable collisions (#214, closes #168):
- In apps that read a config variable (via a registered decoder or a
ConfigFilefield), any flag or feature bound to that variable (such as aConfigflag underEnvPrefix) now fails at startup withErrSchema. Give it an explicitenv:"..."tag or opt out withenv:"-".
- In apps that read a config variable (via a registered decoder or a
- Unparseable field types fail at startup (#210):
- Any flag or positional argument whose type, slice element, or map key/value has no parser now fails schema build with
ErrSchemainstead of failing later when a user supplies a value.
- Any flag or positional argument whose type, slice element, or map key/value has no parser now fails schema build with
- Strict boolean struct tags (#212, closes #165):
hidden,negatable, andbootstrapvalues other than empty,"true", or"false"(such as"yes","1", or"True") now fail at startup withErrSchema. Use the bare tag,"true", or"false".
Configuration
- Config environment variable only for config-capable apps (#214, closes #168):
- Apps without a decoder or
ConfigFilefield no longer read<PREFIX>_CONFIG, andenv:"-"onConfigFilenow disables its environment variable.
- Apps without a decoder or
Errors & diagnostics
- Unified schema and
conga-linterror wording (#211, closes #126):- Shadowing errors end in
"on an ancestor command"without the command name. - Missing-
Runnererrors read:struct <Name>: schema error: runner not implemented: implement conga.Runner: Run(context.Context, *conga.Session) error. - Duplicate
ConfigFileerrors read:duplicate ConfigFile field (already declared by field <First>). - Update callers or tests that assert the previous message text.
- Shadowing errors end in
🐛 Bug Fixes
- maps: Bind maps keyed or valued by named string types without panicking in
reflect.Value.Convert(#215). - lint: Report flags, features, and
Featuresmap variables bound to the reserved config-file environment variable, matching runtime schema build (#216).
📚 Documentation
- struct-tags: Clarify that the
lentag measures rune count on strings and applies per element on slices, while maps useitemsand rejectlenat schema build (#213, refs #166).
Full Changelog: v0.9.0...v0.10.0
Requirements: Go 1.27+ · Docs · pkg.go.dev