cmder

package
v0.0.0-...-d518ac8 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractOverrideMappings

func ExtractOverrideMappings(startArgs []string, delimiter string) ([]string, map[string]string, error)

func NewNoopHandler

func NewNoopHandler(name string) func(context.Context, []string) error

Types

type ContextKey

type ContextKey int
const (
	OverrideContextKey ContextKey = iota
	ReadonlyContextKey
)

type ErrNoop

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

func NewErrNoop

func NewErrNoop(name string) ErrNoop

func (ErrNoop) Error

func (en ErrNoop) Error() string

func (ErrNoop) Is

func (en ErrNoop) Is(other error) bool

type Op

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

func NewOp

func NewOp(
	cmdName,
	short,
	long string,
	op func(ctx context.Context, args []string) error,
	subOps ...*Op,
) *Op

func (*Op) Handle

func (o *Op) Handle(ctx context.Context, args []string) error

type Root

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

func NewRoot

func NewRoot(
	description string,
	writer io.Writer,
) *Root

func (*Root) Handle

func (r *Root) Handle(args []string) error

func (*Root) PrintExtendedUsage

func (r *Root) PrintExtendedUsage(args []string)

func (*Root) PrintUsage

func (r *Root) PrintUsage()

func (*Root) Register

func (r *Root) Register(ops ...*Op)

Jump to

Keyboard shortcuts

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