util

package
v0.0.0-...-4ddf654 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandOutput

type CommandOutput struct {
	Stdout string
	Stderr string
}

CommandOutput wraps the output from an exec command as strings.

func ExecuteCommand

func ExecuteCommand(ctx context.Context, c []string, runAsUser string, envVars []string, stdin io.ReadCloser) (output CommandOutput, err error)

ExecuteCommand executes the command and returns Stdout and Stderr as strings.

func ExecuteCommandYes

func ExecuteCommandYes(ctx context.Context, c []string, runAsUser string, envVars []string) (output CommandOutput, err error)

ExecuteCommandYes wraps ExecuteCommand with the yes binary in order to bypass user input states in automation.

Jump to

Keyboard shortcuts

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