system

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package system provides helpers for running external commands.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCommandNotFound = errors.New("command not found")
	ErrCommandFailed   = errors.New("command failed")
)

Functions

func Run

func Run(ctx context.Context, name string, args ...string) (string, error)

Run executes a command with a 10-second timeout and returns its stdout. Returns ErrCommandNotFound if the binary is not in PATH, or ErrCommandFailed with stderr details on non-zero exit.

Types

This section is empty.

Jump to

Keyboard shortcuts

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