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

execx

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package execx provides a testable abstraction for command execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RealRunner

type RealRunner struct{}

RealRunner implements Runner using os/exec.

func NewRealRunner

func NewRealRunner() *RealRunner

NewRealRunner creates a new RealRunner.

func (*RealRunner) CombinedOutput

func (r *RealRunner) CombinedOutput(ctx context.Context, name string, args ...string) ([]byte, error)

CombinedOutput executes a command and returns its combined stdout and stderr output.

type Runner

type Runner interface {
	CombinedOutput(ctx context.Context, name string, args ...string) ([]byte, error)
}

Runner defines an interface for executing external commands.

Jump to

Keyboard shortcuts

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