doc

package
v3.0.0-rc44 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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