cmd

package
v0.0.0-...-9853328 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagBool = iota
	FlagString
)

Variables

View Source
var GlobalCmds = map[string]func() Cmd{
	"mv":     NewMoveCmd,
	"cp":     NewCpCmd,
	"echo":   NewEchoCmd,
	"rm":     NewRmCmd,
	"rmdir":  NewRmdirCmd,
	"curl":   NewCurlCmd,
	"mkdir":  NewMkdirCmd,
	"cat":    NewCatCmd,
	"whoami": NewWhoamiCmd,
	"pwd":    NewPwdCmd,
	"touch":  NewTouchCmd,
}
View Source
var NilByte = []byte("")

Functions

This section is empty.

Types

type CatCmd

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

func (*CatCmd) Exec

func (cat *CatCmd) Exec(args string) ([]byte, error)

type Cmd

type Cmd interface {
	Exec(string) ([]byte, error)
}

func NewCatCmd

func NewCatCmd() Cmd

func NewCpCmd

func NewCpCmd() Cmd

func NewCurlCmd

func NewCurlCmd() Cmd

func NewEchoCmd

func NewEchoCmd() Cmd

func NewMkdirCmd

func NewMkdirCmd() Cmd

func NewMoveCmd

func NewMoveCmd() Cmd

func NewPwdCmd

func NewPwdCmd() Cmd

func NewRmCmd

func NewRmCmd() Cmd

func NewRmdirCmd

func NewRmdirCmd() Cmd

func NewTouchCmd

func NewTouchCmd() Cmd

func NewWhoamiCmd

func NewWhoamiCmd() Cmd

type CpCmd

type CpCmd struct {
	Src string
	Dst string
	// contains filtered or unexported fields
}

func (*CpCmd) Exec

func (cp *CpCmd) Exec(args string) ([]byte, error)

type CurlCmd

type CurlCmd struct {
	O string
	// contains filtered or unexported fields
}

func (*CurlCmd) Exec

func (curl *CurlCmd) Exec(arg string) ([]byte, error)

type EchoCmd

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

func (*EchoCmd) Exec

func (echo *EchoCmd) Exec(args string) ([]byte, error)

type MkdirCmd

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

func (*MkdirCmd) Exec

func (mkdir *MkdirCmd) Exec(args string) ([]byte, error)

type MoveCmd

type MoveCmd struct {
	Src string
	Dst string
}

func (*MoveCmd) Exec

func (mv *MoveCmd) Exec(args string) ([]byte, error)

type PwdCmd

type PwdCmd struct{}

func (*PwdCmd) Exec

func (pwd *PwdCmd) Exec(args string) ([]byte, error)

type RmCmd

type RmCmd struct {
	Path string
	// contains filtered or unexported fields
}

func (*RmCmd) Exec

func (rm *RmCmd) Exec(args string) ([]byte, error)

type RmdirCmd

type RmdirCmd struct {
	Path string
}

func (*RmdirCmd) Exec

func (rm *RmdirCmd) Exec(args string) ([]byte, error)

type TouchCmd

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

func (*TouchCmd) Exec

func (touch *TouchCmd) Exec(args string) ([]byte, error)

type WhoamiCmd

type WhoamiCmd struct{}

func (*WhoamiCmd) Exec

func (whoami *WhoamiCmd) Exec(string) ([]byte, error)

Jump to

Keyboard shortcuts

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