Documentation ¶ Index ¶ func Alias(name string, alias string) func Commands() map[string]Command func Register(name string, c Command) func Run(args []string) int type Command type HasFlags Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Alias ¶ func Alias(name string, alias string) func Commands ¶ func Commands() map[string]Command func Register ¶ func Register(name string, c Command) func Run ¶ func Run(args []string) int Types ¶ type Command ¶ type Command interface { HasFlags Run(ctx context.Context, f *flag.FlagSet) error } type HasFlags ¶ type HasFlags interface { // Register may be called more than once and should be idempotent. Register(ctx context.Context, f *flag.FlagSet) // Process may be called more than once and should be idempotent. Process(ctx context.Context) error } Source Files ¶ View all Source files command.go register.go Click to show internal directories. Click to hide internal directories.