All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Introduced the
NewMarkdownCommand
method to create acobra.Command
instance for generating Markdown documentation. This command can be linked to the root command and produces documentation for all registered commands and subcommands in Markdown format.
-
Enhanced the
CreateTypedCommand
function to support options, enabling greater flexibility in command creation and configuration. This update allows group commands to be marked as non-runnable, influencing their representation in Markdown documentation. To achieve this, pass theNonRunnable
option to theCreateTypedCommand
function. -
Improved and expanded descriptions for example command groups and applications to enhance clarity and usability.
- Automated dependency version bump
- Automated dependency version bump
- Added tests and increases coverage
- Updated dependencies (as suggested by dependabot; see PR #6, #7, and #8) to address detected security issues
- Minor refactorings to the
command_setup.go
module
- Introduced the
types
package to centralize command type definitions.
- Updated import paths and references across the project to use the new
types
package. - Removed type definitions from the
commands
andreflection
packages; moved interface types to the newtypes
package. - The
reflection
package is now internal because it supports the functionality of the extensions package and is not intended for use by user code. - Upgraded Go SDK version from 1.21 to 1.23.
- Adds the
NewRootCommand
helper method that can be used to create rootcobra.Command
objects with application name and description.
-
Changes the
NewCommandLineApplication
method to set the application name and description (required to generate proper completion scripts for apps) -
Adopts changes to examples
- The
reflection
module ignores fields of unsupported types
- You can now tame the cobra with the
charmer
module; seeexample/cmd/charmer/charmer.go
- Support for positional arguments (pass values to commands without named flags); see
example/commands/hello.go
- Turns the repository into a multi-module workspace (examples are now separated); run
go work sync
after checkout - Refactors the whole package (separates types and functions into several new smalled module types), but the package remains compatible with the previous version
- Initial implementation of
cobra-extension
package that provides functionality to define commands and flags in a declarative manner - Supports command inheritance (define base commands and flags, and reuse them to void duplicate definitions)
- Adds an example application