Versions in this module Expand all Collapse all v1 v1.0.2 May 30, 2025 Changes in this version + type Command struct + Func CommandFunc[T] + Name string + SubCommands map[string]*Command[T] + SupportArgs map[string]struct{} + Usage string + func NewCommand[T any](name string, fn CommandFunc[T]) *Command[T] + func NewRootCommand[T any](fn CommandFunc[T]) *Command[T] + func (c *Command[T]) AddArgs(args ...string) *Command[T] + func (c *Command[T]) AddSubCommand(subCommand *Command[T]) *Command[T] + func (c *Command[T]) AddUsage(usage string) *Command[T] + func (c *Command[T]) BuildChain() + func (c *Command[T]) CheckUsage(args ...string) (usage string, isHelp bool) + func (c *Command[T]) Execute(ctx context.Context, data T, args []string) error + func (c *Command[T]) FormatUsage() string + func (c *Command[T]) GetSubCommands() []string + func (c *Command[T]) GetSupportArgs() []string + func (c *Command[T]) Validate(ctx context.Context, data T, args []string) bool + type CommandFunc func(ctx context.Context, data T, args ...string) error