package
Version:
v0.1.3
Opens a new window with list of versions in this module.
Published: May 17, 2026
License: GPL-2.0, GPL-3.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package exec provides helpers for running system commands.
Has reports whether a command exists in PATH.
Run executes a command with inherited stdio.
Returns an error if the exit code is non-zero.
RunCode executes a command with inherited stdio and returns the exit code.
Use this when the caller needs to branch on specific exit codes.
RunSilent executes a command, discarding stdout and stderr.
Returns an error if the exit code is non-zero.
Sh executes a shell string via "sh -c" and returns trimmed stdout.
Errors are silently ignored — use RunCapture if you need them.
type Result struct {
ExitCode int
Stdout []byte
Stderr []byte
}
Result holds the output of a captured command.
RunCapture executes a command and captures stdout and stderr.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.