common

package
v0.0.0-...-0132329 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNewCommand

func CreateNewCommand(cmd ICommand) *cli.Command

CreateNewCommand creates a new cli.command from the given ICommand

Types

type ICommand

type ICommand interface {
	Run(context.Context, *cli.Command) error
	Name() string
	Usage() string
	Description() string
	Flags() []cli.Flag
	Arguments() []cli.Argument
	Command() *cli.Command
}

ICommand represents a basic command

type ICommandAfter

type ICommandAfter interface {
	After(context.Context, *cli.Command) error
}

ICommandAfter represents a command after action

type ICommandAlias

type ICommandAlias interface {
	Alias() string
}

ICommandAlias represents a command alias

type ICommandBefore

type ICommandBefore interface {
	Before(context.Context, *cli.Command) (context.Context, error)
}

ICommandBefore represents a command before action

type ICommandCategory

type ICommandCategory interface {
	Category() string
}

ICommandCategory represents a command category

type ICommandSubcommands

type ICommandSubcommands interface {
	GetCommands() []ICommand
}

ICommandSubcommands represents a command subcommands

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL