From c9b15a7c574929d29d4caa3bca27fd0d0755bbeb Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 27 Dec 2025 06:16:15 -0500 Subject: Fix -h flag and use functional options --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 98a9549..f25a892 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- `WithOutput(io.Writer)` option for configuring registry output writer. +- `WithErrorHandling(flag.ErrorHandling)` option for configuring flag parse error handling. + +### Changed + +- `NewRegistry` now accepts functional options instead of relying on setter methods. + +### Fixed + +- Subcommand `-h` flag now displays the command's Usage() string instead of empty output. + +### Removed + +- `Registry.SetOutput` method - use `WithOutput` option with `NewRegistry` instead. +- Package-level `SetOutput` function - create a custom registry with `NewRegistry(WithOutput(w))`. + ## [0.3.0] - 2025-12-27 ### Added -- cgit v1.2.3