command

package
v0.0.0-...-20b6b07 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 6 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmder

type Cmder struct{}

Cmder handles running subprograms synchronously and asynchronously.

func New

func New() *Cmder

func (*Cmder) Run

func (c *Cmder) Run(cmd *exec.Cmd) (output string, err error)

Run runs a command in a blocking manner, returning its output and an error if it failed.

func (*Cmder) Start

func (c *Cmder) Start(cmd *exec.Cmd) (
	stdoutLines, stderrLines <-chan string,
	waitError <-chan error, startErr error)

Start launches a command and streams stdout and stderr to channels. All the channels returned are ready only and won't be closed if the command fails later.

Jump to

Keyboard shortcuts

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