goexec

package
v0.0.0-...-eb36113 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

reference

github.com/darjun/goexec

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CombinedOutput

func CombinedOutput(cmd string, arg []string, opts ...Option) ([]byte, error)

func CombinedOutputString

func CombinedOutputString(cmd string, arg []string, opts ...Option) (string, error)

func Output

func Output(cmd string, arg []string, opts ...Option) ([]byte, error)

func OutputString

func OutputString(cmd string, arg []string, opts ...Option) (string, error)

func RunCommand

func RunCommand(cmd string, arg []string, opts ...Option) error

func SeparateOutput

func SeparateOutput(cmd string, arg []string, opts ...Option) ([]byte, []byte, error)

func SeparateOutputString

func SeparateOutputString(cmd string, arg []string, opts ...Option) (string, string, error)

Types

type Option

type Option func(*exec.Cmd)

func WithEnv

func WithEnv(key, value string) Option

func WithOutWriter

func WithOutWriter(out io.Writer) Option

func WithStderr

func WithStderr(stderr io.Writer) Option

func WithStdin

func WithStdin(stdin io.Reader) Option

func WithStdout

func WithStdout(stdout io.Writer) Option

Directories

Path Synopsis
cal
01
02
03
04
05
06

Jump to

Keyboard shortcuts

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