gitexec

package
v0.1.18-rc15 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecRunner

type ExecRunner struct{}

ExecRunner executes Git through os/exec.

func (ExecRunner) Run

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

Run executes req and returns the raw process error with any captured output.

type Request

type Request struct {
	Dir   string
	Env   []string
	Args  []string
	Stdin []byte
}

Request describes one non-interactive Git process invocation.

type Result

type Result struct {
	Stdout []byte
	Stderr []byte
}

Result contains the process output streams captured separately.

func Execute

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

Execute runs req with ExecRunner.

type Runner

type Runner interface {
	Run(context.Context, Request) (Result, error)
}

Runner executes Git requests.

Jump to

Keyboard shortcuts

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