Documentation
¶
Overview ¶
Package command runs local inspection commands with bounded resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrOutputLimit = errors.New("command output exceeds limit")
)
Functions ¶
func Run ¶
Run returns stdout on success and stdout plus stderr on failure. Each stream is limited to 4 MiB and execution to five seconds. A nil env inherits the process environment. Earlier caller cancellation/deadlines remain effective.
func RunWithLimits ¶
func RunWithLimits(parent context.Context, timeout time.Duration, outputLimit int, executable string, env []string, args ...string) ([]byte, error)
RunWithLimits is Run with operation-specific timeout and per-stream byte limits. Oversized output fails rather than returning a successful truncated response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.