Documentation
¶
Index ¶
- Variables
- func ConvertKeywordStore(store keywords.Store) api.KeywordDefinitionItems
- func FilterKeywordStore(store keywords.Store, driver, section, option *string, path naming.Path, ...) (keywords.Store, error)
- func FindKeywords(kw string, withDriver bool, ...) (api.KeywordDefinitionItems, error)
- type ConfigProvider
- type KeywordQuery
Constants ¶
This section is empty.
Variables ¶
var (
ErrBadRequest = errors.New("driver and section filters are mutually exclusive")
)
Functions ¶
func ConvertKeywordStore ¶
func ConvertKeywordStore(store keywords.Store) api.KeywordDefinitionItems
func FilterKeywordStore ¶
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 KeywordQuery ¶
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.