cmd

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg string

Arg appends a single argument to the list of arguments

This option can be specified multiple times to provide multiple arguments. Please keep in mind that the order is maintained.

func (Arg) ApplyExecCmd

func (a Arg) ApplyExecCmd(c *exec.Cmd)

type Arguments

type Arguments []string

Arguments appends multiple arguments to the list of arguments

func Args

func Args(s ...string) Arguments

func (Arguments) ApplyExecCmd

func (as Arguments) ApplyExecCmd(c *exec.Cmd)

type CombinedWriter

type CombinedWriter struct {
	io.Writer
}

CombinedWriter allows passing an io.Writer to which all outputs of the standard and error output of the sub-process are written.

func Combined

func Combined(wr io.Writer) CombinedWriter

func (CombinedWriter) ApplyCmd

func (s CombinedWriter) ApplyCmd(c *g.Cmd)

type Context

type Context struct {
	context.Context
}

Context will start the process with the provided context See exec.CommandContext()

func (Context) ApplyCmd

func (c Context) ApplyCmd(d *g.Cmd)

type Dir

type Dir string

Dir sets the working directory.

func (Dir) ApplyExecCmd

func (d Dir) ApplyExecCmd(c *exec.Cmd)

type DisableASLR

type DisableASLR bool

DisableASLR will start the sub-process with Address Space Layout Randomization disabled

See: https://en.wikipedia.org/wiki/Address_space_layout_randomization

func (DisableASLR) ApplyCmd

func (da DisableASLR) ApplyCmd(d *g.Cmd)

type Env

type Env string

Env appends additional environment variables.

func EnvVar

func EnvVar(k, v string) Env

EnvVar appends a key-value paired environment variable

func (Env) ApplyExecCmd

func (e Env) ApplyExecCmd(c *exec.Cmd)

type Envs

type Envs []string

Envs appends additional environment variables.

func (Envs) ApplyExecCmd

func (e Envs) ApplyExecCmd(c *exec.Cmd)

type ExtraFile

type ExtraFile os.File

ExtraFile appends an additional file to the list of file descriptors which are passed on to the sub-process.

func (*ExtraFile) ApplyExecCmd

func (e *ExtraFile) ApplyExecCmd(c *exec.Cmd)

type StderrWriter

type StderrWriter struct {
	io.Writer
}

StderrWriter allows passing an io.Writer to which all outputs of the standard error output of the sub-process are written.

func Stderr

func Stderr(wr io.Writer) StderrWriter

func (StderrWriter) ApplyCmd

func (s StderrWriter) ApplyCmd(c *g.Cmd)

type StdinReader

type StdinReader struct {
	io.Reader
}

Stdin set the standard input reader

func Stdin

func Stdin(rd io.Reader) StdinReader

func (StdinReader) ApplyExecCmd

func (s StdinReader) ApplyExecCmd(c *exec.Cmd)

type StdoutWriter

type StdoutWriter struct {
	io.Writer
}

StdoutWriter allows passing an io.Writer to which all outputs of the standard output of the sub-process are written.

func Stdout

func Stdout(wr io.Writer) StdoutWriter

func (StdoutWriter) ApplyCmd

func (s StdoutWriter) ApplyCmd(c *g.Cmd)

type SysProcAttr

type SysProcAttr syscall.SysProcAttr

SysProcAttr allows to set system specific process attributes.

func (*SysProcAttr) ApplyExecCmd

func (s *SysProcAttr) ApplyExecCmd(c *exec.Cmd)

Jump to

Keyboard shortcuts

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