command

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(name string, args []string, options ...Option) error

Run runs the input command with input args with Stdout and Stderr defaulted to os.Stderr. Input options will override these defaults.

Types

type Option

type Option func(cmd *exec.Cmd)

Option is the function signature for customizing the internal *exec.Cmd.

func Stdin

func Stdin(r io.Reader) Option

Stdin sets the internal *exec.Cmd's Stdin field.

func Stdout

func Stdout(writer io.Writer) Option

Stdout sets the internal *exec.Cmd's Stdout field.

Jump to

Keyboard shortcuts

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