Documentation
¶
Overview ¶
Package help provides context-sensitive help and guidance for the gdl CLI tool.
Index ¶
- func FormatHelp(content string) string
- type ErrorGuide
- type Example
- type HelpProvider
- func (hp *HelpProvider) GetCommandHelp(command string) string
- func (hp *HelpProvider) GetContextualHelp(context string, args ...interface{}) string
- func (hp *HelpProvider) GetErrorHelp(errorCode errors.ErrorCode) string
- func (hp *HelpProvider) GetQuickHelp() string
- func (hp *HelpProvider) GetTroubleshootingHelp(scenario string) string
- type Solution
- type TroubleshootingGuide
- type TroubleshootingStep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorGuide ¶
type ErrorGuide struct {
ErrorCode errors.ErrorCode
Description string
CommonCauses []string
Solutions []Solution
Examples []Example
SeeAlso []string
}
ErrorGuide provides guidance for specific error types.
type HelpProvider ¶
type HelpProvider struct {
// contains filtered or unexported fields
}
HelpProvider provides context-sensitive help and error guidance.
func NewHelpProvider ¶
func NewHelpProvider() *HelpProvider
NewHelpProvider creates a new help provider with comprehensive guidance.
func (*HelpProvider) GetCommandHelp ¶
func (hp *HelpProvider) GetCommandHelp(command string) string
GetCommandHelp returns help for a specific command.
func (*HelpProvider) GetContextualHelp ¶
func (hp *HelpProvider) GetContextualHelp(context string, args ...interface{}) string
GetContextualHelp provides context-sensitive help based on the current situation.
func (*HelpProvider) GetErrorHelp ¶
func (hp *HelpProvider) GetErrorHelp(errorCode errors.ErrorCode) string
GetErrorHelp returns comprehensive help for a specific error.
func (*HelpProvider) GetQuickHelp ¶
func (hp *HelpProvider) GetQuickHelp() string
GetQuickHelp returns quick help for common scenarios.
func (*HelpProvider) GetTroubleshootingHelp ¶
func (hp *HelpProvider) GetTroubleshootingHelp(scenario string) string
GetTroubleshootingHelp returns troubleshooting guidance for a scenario.
type Solution ¶
type Solution struct {
Title string
Description string
Commands []string
Priority int // Lower number = higher priority
}
Solution represents a solution to an error.
type TroubleshootingGuide ¶
type TroubleshootingGuide struct {
Scenario string
Description string
Steps []TroubleshootingStep
Examples []Example
}
TroubleshootingGuide provides comprehensive troubleshooting for scenarios.