Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseCommand ¶
type BaseCommand struct {
// contains filtered or unexported fields
}
BaseCommand provides common functionality for commands
func NewBaseCommand ¶
func NewBaseCommand(name, description, usage string) *BaseCommand
NewBaseCommand creates a new base command
func (*BaseCommand) Description ¶
func (c *BaseCommand) Description() string
Description returns the command description
func (*BaseCommand) Usage ¶
func (c *BaseCommand) Usage() string
Usage returns command usage instructions
type Command ¶
type Command interface { // Execute runs the command with the given arguments Execute(ctx context.Context, args []string) error // Name returns the name of the command Name() string // Description returns a brief description of what the command does Description() string // Usage returns detailed usage instructions Usage() string }
Command represents a CLI command that can be executed
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages the available commands
func (*Registry) ListCommands ¶
ListCommands returns a sorted list of available commands with their descriptions
Click to show internal directories.
Click to hide internal directories.