help

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lines

func Lines(sections []Section) []string

Lines returns plain text lines for searchable help content.

func Render

func Render(sections []Section, palette Palette, search *regexp.Regexp) string

Render converts help sections into styled terminal content.

Types

type Item

type Item struct {
	Key  string
	Desc string
}

Item is a single key binding and description in a help section.

type Palette

type Palette struct {
	HeaderFG string
	HeaderBG string
	KeyFG    string
	DescFG   string
	SearchFG string
	SearchBG string
}

Palette contains the colors needed to render help content.

type Section

type Section struct {
	Title string
	Items []Item
}

Section groups related help items under a title.

Jump to

Keyboard shortcuts

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