subproc

package
v0.6.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

Cmd is context of subprocess

func New

func New(name string, arg ...string) *Cmd

New creates new Cmd instance

func (*Cmd) AddEnv

func (c *Cmd) AddEnv(s ...string) *Cmd

AddEnv method adds environment variables element

func (*Cmd) HideWindow

func (c *Cmd) HideWindow(enable bool) *Cmd

HideWindow method sets HideWindow attribution flag element (Windows only)

func (*Cmd) Output

func (c *Cmd) Output() ([]byte, error)

Output method runs subprocess and output result

func (*Cmd) WithContext

func (c *Cmd) WithContext(ctx context.Context) *Cmd

WithContext method sets context element

func (*Cmd) WithStderr

func (c *Cmd) WithStderr(w io.Writer) *Cmd

WithStderr method sets stderr element

func (*Cmd) WithStdin

func (c *Cmd) WithStdin(r io.Reader) *Cmd

WithStdin method sets stdin element

Jump to

Keyboard shortcuts

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