Documentation ¶
Index ¶
- func CompleteOptions(opt Options) error
- func FindOptions[T any](s OptionSetProvider) []T
- type Condition
- type ConditionFunction
- type Flag
- type OptionSelector
- type OptionSet
- type OptionSetProvider
- type OptionWithCLIContextCompleter
- type OptionWithOutputContextCompleter
- type Options
- type OptionsProcessor
- type SimpleOptionCompleter
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteOptions ¶
func FindOptions ¶
func FindOptions[T any](s OptionSetProvider) []T
Types ¶
type ConditionFunction ¶
type ConditionFunction func() bool
func (ConditionFunction) IsTrue ¶
func (f ConditionFunction) IsTrue() bool
type OptionSelector ¶
type OptionSelector func(provider OptionSetProvider) bool
func Always ¶
func Always() OptionSelector
func Never ¶
func Never() OptionSelector
func Not ¶
func Not(s OptionSelector) OptionSelector
type OptionSet ¶
type OptionSet []Options
func (OptionSet) AsOptionSet ¶
func (OptionSet) Get ¶
Get extracts the option for a given target. This might be a
- pointer to a struct implementing the Options interface which will fill the struct with a copy of the options OR
- a pointer to such a pointer which will be filled with the pointer to the actual member of the OptionSet.
func (OptionSet) ProcessOnOptions ¶
func (s OptionSet) ProcessOnOptions(f OptionsProcessor) error
ProcessOnOptions processes all options found in the option set woth a given OptionsProcessor.
type OptionSetProvider ¶
type OptionSetProvider interface {
AsOptionSet() OptionSet
}
type OptionWithCLIContextCompleter ¶
OptionWithCLIContextCompleter describes the interface for an option object requirung completion with a CLI context.
type OptionWithOutputContextCompleter ¶
OptionWithOutputContextCompleter describes the interface for an option object requirung completion with an output context.
type OptionsProcessor ¶
OptionsProcessor is handler used to process all option found in a set of options.
func CompleteOptionsWithCLIContext ¶
func CompleteOptionsWithCLIContext(ctx clictx.Context) OptionsProcessor
type SimpleOptionCompleter ¶
type SimpleOptionCompleter interface {
Complete() error
}
SimpleOptionCompleter describes the interface for an option object requirung completion without any further information.
Click to show internal directories.
Click to hide internal directories.