builtin

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Builtin = make(map[string]BuiltinFunc)

Functions

func Awk

func Awk(ctx context.Context, host Host, ios IOs, args []string) error

func Cat

func Cat(ctx context.Context, host Host, ios IOs, args []string) error

func Chmod

func Chmod(ctx context.Context, host Host, ios IOs, args []string) error

func Command

func Command(ctx context.Context, host Host, ios IOs, args []string) error

func Curl

func Curl(ctx context.Context, host Host, ios IOs, args []string) error

func Cut

func Cut(ctx context.Context, host Host, ios IOs, args []string) error

func Echo

func Echo(ctx context.Context, host Host, ios IOs, args []string) error

func Grep

func Grep(ctx context.Context, host Host, ios IOs, args []string) error

func Install

func Install(ctx context.Context, host Host, ios IOs, args []string) error

func Ln

func Ln(ctx context.Context, host Host, ios IOs, args []string) error

func Mkdir

func Mkdir(ctx context.Context, host Host, ios IOs, args []string) error

func Mktemp

func Mktemp(ctx context.Context, host Host, ios IOs, args []string) error

func Mv

func Mv(ctx context.Context, host Host, ios IOs, args []string) error

func NewExitStatusError

func NewExitStatusError(status uint8) error

func Openssl

func Openssl(ctx context.Context, host Host, ios IOs, args []string) error

func Rm

func Rm(ctx context.Context, host Host, ios IOs, args []string) error

func Sed

func Sed(ctx context.Context, host Host, ios IOs, args []string) error

func Shasum

func Shasum(ctx context.Context, host Host, ios IOs, args []string) error

func Tar

func Tar(ctx context.Context, host Host, ios IOs, args []string) error

func Tr

func Tr(ctx context.Context, host Host, ios IOs, args []string) error

func Uname

func Uname(ctx context.Context, host Host, ios IOs, args []string) error

Types

type BuiltinFunc

type BuiltinFunc func(ctx context.Context, host Host, ios IOs, args []string) error

type ExitStatusError

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

func (*ExitStatusError) Error

func (e *ExitStatusError) Error() string

func (ExitStatusError) Status

func (e ExitStatusError) Status() uint8

type Host

type Host interface {
	Log(tag string, message ...string)

	File(ctx context.Context, path string) []byte
	Write(ctx context.Context, path string) io.WriteCloser
	MkDir(ctx context.Context, path string)
	Remove(ctx context.Context, path string)
	Move(ctx context.Context, from, to string) error
}

type IOs

type IOs struct {
	In  io.Reader
	Out io.Writer
}

Jump to

Keyboard shortcuts

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