grace

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout    = errors.New("timeout")
	ErrFailToKill = errors.New("failed to kill process")
)

Functions

func RunTimedSh

func RunTimedSh(timeout time.Duration, command string) (string, error)

Command is wrapped in single quotes!

Types

type Output

type Output struct {
	StdOut   string
	StdErr   string
	ExitCode int
}

func RunTimed

func RunTimed(timeout time.Duration, env []string, cmd string, args ...string) (Output, error)

func Spawn

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

func (Output) Combine

func (o Output) Combine() string

Jump to

Keyboard shortcuts

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