execute

package
v0.0.0-...-ee163f1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFoundExecutor = errors.New("error: not found executor")
)

Functions

func Execute

func Execute(path string) v.Future[v.Result[ExecuteOutput, *exec.ExitError]]

func IsExecExt

func IsExecExt(ext string) bool

func Lookup

func Lookup(rootPath string) v.Result[LookupResult, error]

func MakeExecutable

func MakeExecutable(ext ...string)

func RegisterExecutor

func RegisterExecutor(ext string, f ScriptExecutor) bool

func RemoveExecutor

func RemoveExecutor(ext string) bool

func SetExtnameExecutable

func SetExtnameExecutable(ext string, executable bool)

Types

type ExecuteOutput

type ExecuteOutput struct {
	Output  []byte
	Ignored bool
}

type FunctionalScriptExecutor

type FunctionalScriptExecutor func(path string) v.Result[[]byte, *exec.ExitError]

func (FunctionalScriptExecutor) ExecuteScript

func (f FunctionalScriptExecutor) ExecuteScript(path string) v.Future[v.Result[[]byte, *exec.ExitError]]

type LookupResult

type LookupResult []string

type ScriptExecutor

type ScriptExecutor interface {
	ExecuteScript(path string) v.Future[v.Result[[]byte, *exec.ExitError]]
}

Jump to

Keyboard shortcuts

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