shell

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 6 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

Types

type Command

type Command struct {
	Dir        string
	Stdin      io.Reader
	Stdout     io.Writer
	Stderr     io.Writer
	Env        []string
	ExtraFiles []*os.File
}

func (*Command) Clone

func (c *Command) Clone() *Command

func (*Command) Run

func (c *Command) Run(ctx context.Context, name string, args ...string) error

func (*Command) Start

func (c *Command) Start(ctx context.Context, name string, args ...string) (*Process, error)

type Process

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

func Start

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

func (*Process) Close

func (p *Process) Close() error

func (*Process) Restart

func (p *Process) Restart(ctx context.Context) (*Process, error)

func (*Process) Run

func (p *Process) Run() error

func (*Process) Start

func (p *Process) Start() error

func (*Process) Wait

func (p *Process) Wait() error

Jump to

Keyboard shortcuts

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