shell

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd exec.Cmd

func (*Cmd) Run

func (c *Cmd) Run(ctx context.Context) error

func (*Cmd) Start

func (c *Cmd) Start() (Process, error)

type Command

type Command interface {
	Start() (Process, error)
	Run(ctx context.Context) error
}

Command is a single command that can be started or run

type Commands

type Commands interface {
	Command(name string, args ...string) *Cmd
}

Commands is a command executor

type Exec

type Exec struct {
	Dir    string
	Env    []string
	Stderr io.Writer
	Stdout io.Writer
	Stdin  io.Reader
}

func New

func New(dir string) *Exec

func (*Exec) Command

func (c *Exec) Command(name string, args ...string) *Cmd

type Process

type Process interface {
	Wait(ctx context.Context) error
	Stop(ctx context.Context) error
	Restart(ctx context.Context) (Process, error)
}

Process is a running command

Jump to

Keyboard shortcuts

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