exec

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Command string
	Args    []string
	Dir     string
	Stdin   string
	Timeout time.Duration
	// MaxOutputBytes caps combined stdout/stderr output; 0 means unlimited.
	MaxOutputBytes int
	// StreamTo, if non-nil, means stdout and stderr are also written here live,
	// in addition to being captured in the Result.
	StreamTo io.Writer
	// Env holds extra KEY=VALUE entries appended to the inherited environment
	// (later entries win), e.g. to neutralise a tool's config lookups.
	Env []string
}

type Result

type Result struct {
	Stdout string
	Stderr string
	// ExitCode is the process exit code; it is -1 when TimedOut is true.
	ExitCode  int
	Elapsed   time.Duration
	TimedOut  bool
	Truncated bool
}

func Run

func Run(ctx context.Context, req Request) (Result, error)

type Runner

type Runner struct{}

Runner adapts the package-level Run into a value that satisfies codex.Runner.

func (Runner) Run

func (Runner) Run(ctx context.Context, req Request) (Result, error)

Jump to

Keyboard shortcuts

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