command

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	SendCommand     func(*commander.Command) error
	CtrlDataCommand func() []byte
}

func (*Command) CtrlData added in v0.2.2

func (c *Command) CtrlData() func() []byte

func (*Command) Exec added in v0.2.7

func (c *Command) Exec(cmd *commander.Command) error

func (*Command) FindCommand added in v0.2.2

func (c *Command) FindCommand(cmd string, cmdlist []*commander.Command) (*commander.Command, error)

So for this, we want to parse out a proper cmd - each arg can have spaces if it's wrapped in \" \"

func (*Command) FindCommands added in v0.2.2

func (c *Command) FindCommands(b []byte) ([]*commander.Command, error)

FindCommands within a byte array It returns an error if it encounters malformed input

func (*Command) FromBytes added in v0.2.2

func (c *Command) FromBytes(input []byte) (*commander.Command, error)

func (*Command) FromString added in v0.2.2

func (c *Command) FromString(input string) (*commander.Command, error)

FromString returns a partially filled command It will have a Heading type of DefaultGroup

func (*Command) WriteCommands added in v0.2.2

func (c *Command) WriteCommands(cmdlist []*commander.Command, to io.Writer) error

Jump to

Keyboard shortcuts

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