Documentation
¶
Overview ¶
Package cli parses specd's raw command-line arguments into Args: a list of positional tokens and a flag map. It has no knowledge of any specific command — that mapping from parsed Args to behavior lives in internal/cmd — so it stays a single-purpose, dependency-free tokenizer shared by every command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
Args holds the parsed command-line arguments for a specd invocation: ordered positional tokens and flag values keyed by flag name (without the leading "--").
func ParseArgs ¶
ParseArgs splits argv into positional tokens and "--flag"/"--flag=value" entries. A "--flag=value" token binds the value explicitly; a known boolean flag (see booleanFlags) is recorded as "true" without consuming the next token; any other "--flag" consumes the following token as its value unless that token is itself a flag, in which case it is also recorded as "true".
func (Args) Bool ¶
Bool reports whether the flag key was set to the literal value "true" (the value ParseArgs assigns to boolean and bare flags).