doc

package
v3.0.0-rc46 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest = errors.New("driver and section filters are mutually exclusive")
)

Functions

func ConvertKeywordStore

func ConvertKeywordStore(store keywords.Store) api.KeywordDefinitionItems

func FilterKeywordStore

func FilterKeywordStore(store keywords.Store, driver, section, option *string, path naming.Path, getConfigProvider func() (ConfigProvider, error)) (keywords.Store, error)

func FindKeywords

func FindKeywords(kw string, withDriver bool, get func(section, option *string) (api.KeywordDefinitionItems, error)) (api.KeywordDefinitionItems, error)

FindKeywords returns the documentation of the keywords a --kw value names, from the first of its lookups finding some.

A value naming no keyword is an error, rather than an empty documentation: nothing printed reads as a keyword with no text. A lookup failing is a lookup finding nothing, as a bare word that is not a section fails as a section, unless it is the only one.

Types

type ConfigProvider

type ConfigProvider interface {
	Config() *xconfig.T
}

type KeywordQuery

type KeywordQuery struct {
	Section *string
	Option  *string
}

KeywordQuery is a lookup of the keyword documentation, by section and option, either nil for any.

func KeywordQueries

func KeywordQueries(s string, withDriver bool) []KeywordQuery

KeywordQueries returns the lookups a --kw value is tried as, in order, until one finds keywords.

The value is [<section>.]<option>. A bare word is first an option, in any section, as the flag says, and then a section, listing its keywords. With a driver, a bare word is only an option: the driver names the section.

Jump to

Keyboard shortcuts

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