child

package
v0.1.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package child provides the functionality to execute child command line processes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cfg *RunConfig) (int, error)

Run executes a child process with the provided arguments.

Types

type RunConfig

type RunConfig struct {
	Stdout     io.Writer
	Stderr     io.Writer
	WorkingDir string
	Command    string
	Args       []string

	// AllowedEnvKeys and DeniedEnvKeys respectively define an allow/deny list of
	// patterns for environment variable keys. Keys are matched using
	// [filepath.Match].
	AllowedEnvKeys []string
	DeniedEnvKeys  []string
}

RunConfig are the inputs for a run operation.

Jump to

Keyboard shortcuts

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