Documentation
¶
Overview ¶
Package lexer contains FlagTokenizer which parses args/actions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlagTokenizer ¶
type FlagTokenizer struct { BooleanFlags sets.TinySet[string] Tokenized map[string]string Actions []string }
FlagTokenizer holds the names of the boolean flags and uses them the tokenize the input args into args and actions. Actions are args that are not flags.
After calling FlagTokenizer.TokenizeFlags the Tokenized and Action fields will be initialized.
func NewFlagTokenizer ¶
func NewFlagTokenizer(booleanFlags ...string) *FlagTokenizer
NewFlagTokenizer creates a new FlagTokenizer from a list of boolean flag names
func (*FlagTokenizer) TokenizeFlags ¶
func (ft *FlagTokenizer) TokenizeFlags(args []string)
TokenizeFlags sorts the args into flags and actions, without parsing the values.
Click to show internal directories.
Click to hide internal directories.