Documentation
¶
Overview ¶
Package charm is minimilast CLI framework inspired by cobra and urfave/cli.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRun = errors.New("no run method")
View Source
var Help = &Spec{ Name: "help", Usage: "help [command]", Short: "display help for a command", Long: ` For help on the top-level command just type "help". For help on a subcommand, type "help command" where command is the name of the command. For help on command nested further, type "help cmd1 cmd2" and so forth.`, HiddenFlags: "v", New: func(parent Command, f *flag.FlagSet) (Command, error) { c := &HelpCommand{} f.BoolVar(&c.vflag, "v", false, "show hidden commands and flags") return c, nil }, }
Functions ¶
This section is empty.
Types ¶
type HelpCommand ¶
type HelpCommand struct {
// contains filtered or unexported fields
}
func (*HelpCommand) Prepare ¶
func (c *HelpCommand) Prepare(f *flag.FlagSet)
func (*HelpCommand) Run ¶
func (c *HelpCommand) Run(args []string) error
type Spec ¶
type Spec struct {
Name string
Usage string
Short string
Long string
New Constructor
Hidden bool
HiddenFlags string
RedactedFlags string
Empty *Spec
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.