cmd

package
v2.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	Name   string
	Args   []string
	Stdin  *os.File
	Stdout *os.File
	Stderr *os.File
}

func New

func New(cmd string) *Cmd

func NewWithArray

func NewWithArray(cmd []string) *Cmd

func (*Cmd) CombinedOutput

func (cmd *Cmd) CombinedOutput() (string, error)

func (*Cmd) Exec

func (cmd *Cmd) Exec() error

Exec runs command with exec(3) Note that Windows doesn't support exec(3): http://golang.org/src/pkg/syscall/exec_windows.go#L339

func (*Cmd) Run

func (cmd *Cmd) Run() error

Run runs command with `Exec` on platforms except Windows which only supports `Spawn`

func (*Cmd) Spawn

func (cmd *Cmd) Spawn() error

Spawn runs command with spawn(3)

func (Cmd) String

func (cmd Cmd) String() string

func (*Cmd) Success

func (cmd *Cmd) Success() bool

func (*Cmd) WithArg

func (cmd *Cmd) WithArg(arg string) *Cmd

func (*Cmd) WithArgs

func (cmd *Cmd) WithArgs(args ...string) *Cmd

Jump to

Keyboard shortcuts

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