Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigSummary ¶
ConfigSummary contains relevant configuration information for error context.
type ErrorContext ¶
type ErrorContext struct {
Command string
Arguments []string
Config ConfigSummary
Timestamp time.Time
}
ErrorContext provides additional information for error rendering.
func Extract ¶
func Extract(cmd *cobra.Command, cfg *ConfigSummary) ErrorContext
Extract pulls context from various sources.
func ExtractCommand ¶
func ExtractCommand(cmd *cobra.Command) ErrorContext
ExtractCommand creates context from just a command.
func ExtractConfig ¶
func ExtractConfig(cfg *ConfigSummary) ErrorContext
ExtractConfig creates context from just config.
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter converts domain errors to user-friendly messages.
func NewFormatter ¶
NewFormatter creates a formatter with the given options.
func (*Formatter) FormatWithContext ¶
func (f *Formatter) FormatWithContext(err error, ctx ErrorContext) string
FormatWithContext adds contextual information to error formatting.
type SuggestionEngine ¶
type SuggestionEngine struct {
// contains filtered or unexported fields
}
SuggestionEngine generates actionable resolution steps.
func (*SuggestionEngine) Generate ¶
func (e *SuggestionEngine) Generate(err error) []string
Generate creates suggestions for an error.
func (*SuggestionEngine) Prioritize ¶
func (e *SuggestionEngine) Prioritize(suggestions []string) []string
Prioritize orders suggestions by likely usefulness.
Click to show internal directories.
Click to hide internal directories.