help

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package help provides context-sensitive help and guidance for the gdl CLI tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatHelp

func FormatHelp(content string) string

FormatHelp formats help text for display.

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 Example

type Example struct {
	Command     string
	Description string
	Tags        []string
}

Example represents a command example with description.

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.

type TroubleshootingStep

type TroubleshootingStep struct {
	Step        int
	Title       string
	Description string
	Commands    []string
	Expected    string
}

TroubleshootingStep represents a step in troubleshooting.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL