help

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HelpEntry

type HelpEntry struct {
	Name        string   // Primary name (e.g., "print", "if statement")
	Description string   // Short description
	Category    string   // "command", "keyword", "function", "operator", "concept"
	LongDesc    string   // Detailed explanation
	Examples    []string // Code examples
	Keywords    []string // Additional search terms
	Aliases     []string // Alternative names
	SeeAlso     []string // Related topics
}

HelpEntry represents a single help topic with searchable metadata.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry manages all help entries and provides search functionality.

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new help registry with default content.

func (*Registry) AllCategories

func (r *Registry) AllCategories() []string

AllCategories returns a list of all unique categories in the registry.

func (*Registry) AllEntries

func (r *Registry) AllEntries() []*HelpEntry

AllEntries returns all help entries sorted by name.

func (*Registry) EntriesByCategory

func (r *Registry) EntriesByCategory(category string) []*HelpEntry

EntriesByCategory returns all help entries in a specific category.

func (*Registry) Lookup

func (r *Registry) Lookup(name string) *HelpEntry

Lookup retrieves a help entry by exact name (case-insensitive).

func (*Registry) Register

func (r *Registry) Register(entry *HelpEntry)

Register adds a new help entry to the registry.

func (*Registry) Search

func (r *Registry) Search(query string) []SearchResult

Search performs fuzzy search across all help entries and returns ranked results.

type SearchResult

type SearchResult struct {
	Entry *HelpEntry
	Score int // Higher is better
}

SearchResult represents a help entry with its relevance score.

Jump to

Keyboard shortcuts

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