cmd

package
v0.0.0-...-a818b37 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(args []string) (err error)

Types

type Ancestor

type Ancestor struct {
	Commander Commander
	Command   *flag.FlagSet
	Root      *Ancestor
	Parent    *Ancestor
	// contains filtered or unexported fields
}

type Commander

type Commander interface {
	Init(*Ancestor)
	Run(ctx context.Context, cd *Ancestor, args []string) error
	Commands() []Commander
	Name() string
}

type Exec

type Exec struct {
	// contains filtered or unexported fields
}

func New

func New(rootCmd Commander) (*Exec, error)

func (*Exec) Execute

func (r *Exec) Execute(ctx context.Context, args []string) (*Ancestor, error)

Jump to

Keyboard shortcuts

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