Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd[T any] struct { ID string Desc string FlagFunc func(m Manager, stored *T, f *flag.FlagSet) error Execute func(m Manager, stored T, args []string) error // contains filtered or unexported fields }
func (*Cmd[T]) Description ¶
type Command ¶
type Command interface { // How the command should be called from the command line Name() string // Add optional flags to the flagset AddFlags(m Manager, f *flag.FlagSet) error // Execute the command // Any arguments not consumed by the flags will be passed here Exec(m Manager, args []string) error }
type CommandDescriptor ¶
Click to show internal directories.
Click to hide internal directories.