cmd

package
v0.0.0-...-3b0d57d Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(name string, args []byte) error

func ExecuteCmdline

func ExecuteCmdline(name string, args ...string) error

func GetCommands

func GetCommands() (commands []string, err error)

func IsAvailable

func IsAvailable(name string) bool

func Register

func Register(name string, cmd Cmd)

func UnmarshalAndExecute

func UnmarshalAndExecute(args []string) (done bool, err error)

Types

type Cmd

type Cmd interface {
	ParseArgs(args []string) (parsedArgs interface{}, err error)
	UnmarshalArgs(marshaledArgs []byte) (parsedArgs interface{}, err error)
	Execute(parsedArgs interface{}) error
}

func GetCommand

func GetCommand(name string) (command Cmd, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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