executil

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cmd *exec.Cmd) error

Run starts the specified command and waits for it to complete.

The difference to Run from exec.CommandContext is that it sends an interrupt instead of a kill, which gives the process time for a graceful shutdown.

Types

type ChainExecutor

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

func NewChainExecutor

func NewChainExecutor(ctx context.Context) *ChainExecutor

func (*ChainExecutor) Err

func (e *ChainExecutor) Err() error

func (*ChainExecutor) OutputInt64

func (e *ChainExecutor) OutputInt64(command string, args ...string) int64

func (*ChainExecutor) OutputString

func (e *ChainExecutor) OutputString(command string, args ...string) string

func (*ChainExecutor) Run

func (e *ChainExecutor) Run(command string, args ...string)

Jump to

Keyboard shortcuts

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