Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertImplementation ¶
AssertImplementation provides a comprehensive test suite for CLI mapper implementations. It validates that any mapper correctly handles all aspects of CLI execution including: - CLI name resolution and preservation - Error handling and propagation (including custom exit statuses and help requests) - Flag parsing and inheritance across command hierarchies - Hook execution order (persistent and command-specific hooks) - Command structure navigation and execution - Context propagation through the command chain
The executeFunc parameter should be the mapper's main execution function that takes command line arguments and a CLI instance, then executes the appropriate command. This allows testing any mapper implementation (e.g., spf13/cobra, urfave/cli, etc.) against the same comprehensive test suite.
Types ¶
This section is empty.