Documentation
¶
Overview ¶
Package cli provides command-line interface functionality for kusage. This package implements the command pattern and encapsulates all CLI-specific logic, including argument parsing, validation, and help text generation.
Index ¶
Constants ¶
const (
// Name of the CLI program.
Name = "kusage"
)
Variables ¶
var ( // Set at build time via -ldflags "-X main.version=..." Version = "dev" Commit = "none" Date = "unknown" )
Functions ¶
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser handles command-line argument parsing and validation. This type implements the command pattern and encapsulates all CLI argument processing logic.
func (*Parser) Parse ¶
Parse processes command-line arguments and returns a validated configuration. This method implements comprehensive argument parsing with proper error handling and validation, following CLI best practices for user experience.
func (*Parser) PrintUsage ¶
func (p *Parser) PrintUsage()
PrintUsage outputs comprehensive usage information. This method provides detailed help text following Unix CLI conventions and includes examples for common use cases.