Documentation
¶
Overview ¶
Package attributes holds metadata a command applies to itself.
Go has no attributes and no reflection over declarations, so metadata that would otherwise be read back off a class is instead a value with an Apply method: the declaration stays next to the type it describes, and it is checked by the compiler rather than read back at some later point.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Description ¶
type Description struct {
// Description is the sentence. One line, imperative, no full stop.
Description string
}
Description is the line a listing prints beside a command name.
func (Description) Apply ¶
func (d Description) Apply(c *console.Command)
Apply writes the description onto a command.
type Signature ¶
type Signature struct {
// Signature is the expression Parse reads: "mail:send {user} {--queue=}".
Signature string
// Aliases are the other names the command answers to. Nil leaves whatever
// the command already had.
Aliases []string
}
Signature is the name, arguments and options of a command, with its aliases.
Click to show internal directories.
Click to hide internal directories.