Help us shape the future of Go! Take the 2026 Go Developer Survey

executor

package
v0.0.63 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

func ChildExecutorCtx

func ChildExecutorCtx(ctx *Context, command *config.Command) *Context

func NewExecutorCtx

func NewExecutorCtx(ctx context.Context, command *config.Command) *Context

type DependencyError

type DependencyError struct {
	Chain []string
	Err   error
}

DependencyError carries the full dependency chain when a command fails. Chain is outermost-first (e.g., ["deploy", "build", "lint"]).

func (*DependencyError) Error

func (e *DependencyError) Error() string

func (*DependencyError) ExitCode

func (e *DependencyError) ExitCode() int

ExitCode propagates the exit code from the innermost ExecuteError, or returns 1.

func (*DependencyError) Unwrap

func (e *DependencyError) Unwrap() error

type ExecuteError

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

func (*ExecuteError) Cause

func (e *ExecuteError) Cause() error

func (*ExecuteError) Error

func (e *ExecuteError) Error() string

func (*ExecuteError) ExitCode

func (e *ExecuteError) ExitCode() int

ExitCode will return exit code from underlying ExitError or returns default error code.

func (*ExecuteError) Unwrap

func (e *ExecuteError) Unwrap() error

type Executor

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

func NewExecutor

func NewExecutor(cfg *config.Config, runner ScriptRunner) *Executor

func (*Executor) Execute

func (e *Executor) Execute(ctx *Context) error

Execute executes command and it depends recursively Command can be executed in parallel.

type ScriptRunner added in v0.0.62

type ScriptRunner func(command *config.Command, script string) error

ScriptRunner executes a shell script in the context of a command.

func NewShellRunner added in v0.0.62

func NewShellRunner(cfg *config.Config, out io.Writer) ScriptRunner

NewShellRunner returns a ScriptRunner that spawns a real OS process.

Jump to

Keyboard shortcuts

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