cmder

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Name string
}

type Cmd

type Cmd struct {
	Name string
	Func any
	Args []Arg
}

func NewCmd

func NewCmd(name string, f any) *Cmd

func WithArgs

func WithArgs(cmd *Cmd, argName string) *Cmd

type RootCmd

type RootCmd struct {
	Cmds []*Cmd
}

func NewRoot

func NewRoot() *RootCmd

func (*RootCmd) AddCmds

func (rc *RootCmd) AddCmds(cmd ...*Cmd) *RootCmd

func (*RootCmd) Execute

func (rc *RootCmd) Execute()

func (*RootCmd) TryExecute added in v0.18.0

func (rc *RootCmd) TryExecute(args []string) error

Jump to

Keyboard shortcuts

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