Repository navigation
v0.2.0
Immutable
release. Only release title and notes can be modified.
CONGA v0.2.0 adds per-feature environment variables, makes struct tag validation always on, and lets applications replace the writer that .env loading uses.
🚀 Highlights
- Per-feature environment variables:
envprefixon aFeaturescontainer derives one variable per feature, feature fields acceptenvtags, and root help lists each feature's variables (#53, #57). - Always-on tag validation: Unknown struct tag keys always fail schema build, and
app.AllowTagsis the only way to accept extra keys (#58). - Injectable
.envwriter:App.SetenvFuncreplaces theos.Setenvcall thatApp.Dotenvuses, so tests can passt.Setenv(#55).
⚠ Breaking Changes & Migration
App.StrictTagValidationremoved (#58):- Struct tag validation is always on. Delete
StrictTagValidation(...)calls, and list any foreign tag keys withapp.AllowTags("<key>", ...), which matches keys exactly. - The
conga:"allow-unknown-tags"andconga:"recurse"directives fail schema build withErrSchema. Replace them withapp.AllowTags. conga-lintdrops its-strictflag.
- Struct tag validation is always on. Delete
envprefixon aFeaturescontainer derives one variable per feature (#53, closes #49):envprefix:"APP"used to derive one combinedname=valuemap variable,APP_<FLAG>, from the container's flag name. It now derivesAPP_<FEATURE>for each feature.- To keep a single combined variable, name it with
env:"<NAME>"on the container instead ofenvprefix.
{{env}}inFeatureshelp text (#57):{{env}}now substitutes only the container's combined-mapenvvariable. A container whose only environment surface isenvprefixor fieldenvtags fails schema build withErrSchema.- Remove
{{env}}from such help text. Root help now lists each feature's variables as[env: ...].
✨ Features
- features: Feature fields accept
env:"NAME1,NAME2"andenv:"-", and an invalid per-feature value is a usage error naming the variable (#53, closes #49). - features: Root help lists each feature's environment variables as
[env: VAR1, VAR2](#57). - dotenv: Add
App.SetenvFuncto replace the writerApp.Dotenvuses for loaded variables (defaultos.Setenv) (#55, closes #51). - config: Config-file flag help lists the registered decoders, for example
[decoders: .json, .yaml](#59). - why: Help shows
--why[=FORMAT], and completion offers--why=<format>, only when JSON output is enabled withWhyJSON()(#61). - cli: Built-in help, version, and completion command fields accept
aliasesandgrouptags (#66). (groupwas renamedsectioninv0.5.0.)
🐛 Bug Fixes
- cli: Synthesized help, version, and completion commands follow the app-wide built-in visibility toggles, and disabled
--whyand--completionflags no longer appear on subcommands (#64).
📚 Documentation
- website: Document
--whyflag help and completion rendering (#67).
Full Changelog: v0.1.1...v0.2.0
Requirements: Go 1.27+ · Docs · pkg.go.dev