help

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package help renders operator-facing documentation for the runtime knobs commons owns — log verbosity, log formatting, HTTP wire tracing, HAR capture and output formatting — as a clicky Textable, so every CLI built on commons can splice the same block into its --help instead of re-documenting the same properties (or, more often, not documenting them at all).

The package deliberately sits outside logger/ and http/: clicky imports commons/{logger,text,collections,context}, so rendering help from any of those packages would create an import cycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Help

func Help(names ...string) api.Text

Help composes the selected topics into a single document. With no names every topic is included; names are matched with collections.MatchItems, so "http", "!har" and "log*" all select as expected. The result is an api.Text, which satisfies api.Textable — callers pick String(), ANSI(), Markdown() or HTML().

Types

type Topic

type Topic struct {
	// Name is the stable selector used to filter topics, e.g. "http".
	Name string

	// Title is the section heading.
	Title string

	// Body is the rendered section, excluding its heading.
	Body api.Text
}

Topic is one named section of the help document.

func Topics

func Topics() []Topic

Topics returns every section in display order.

Jump to

Keyboard shortcuts

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