climax
climax copied to clipboard
Lightweight command syntax
We need a super lightweight syntax of creating simple flag-less commands. Something like this would be great:
app := climax.New("appname")
app.Comm("command", "i am command", func (ctx climax.Context) {
return 0;
});
Try:
type Application struct {
Version string // `1.5`
Command
Commands []*Command
Topics []*Topic
Groups []*Group
// Default is a default handler. It gets executed if there are
// no command line arguments (except the program name), when
// otherwise, by default, the help entry is being shown.
Default CmdHandler
ungroupedCmdsCount int
}