execution

package
v0.1.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MaxCapturedOutput = 1 << 20 // 1 MiB

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Argv            []string `json:"argv"`
	ExitCode        int      `json:"exit_code"`
	Stdout          string   `json:"stdout"`
	Stderr          string   `json:"stderr"`
	StdoutTruncated bool     `json:"stdout_truncated"`
	StderrTruncated bool     `json:"stderr_truncated"`
}

func Run

func Run(argv []string, stdout, stderr io.Writer) (Result, error)

func RunInDir

func RunInDir(
	argv []string,
	dir string,
	stdout, stderr io.Writer,
) (Result, error)

func RunInDirWithExecutable

func RunInDirWithExecutable(
	argv []string,
	executable string,
	dir string,
	stdout, stderr io.Writer,
) (Result, error)

RunInDirWithExecutable runs an explicitly selected executable while preserving the original argv in the execution record.

func RunInDirWithExecutableEnv

func RunInDirWithExecutableEnv(
	argv []string,
	executable string,
	dir string,
	env []string,
	stdout, stderr io.Writer,
) (Result, error)

RunInDirWithExecutableEnv runs the selected executable with an explicitly supplied environment, preserving the original argv.

Jump to

Keyboard shortcuts

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