step

package
v28.11.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: Apache-2.0 Imports: 1 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execution

type Execution struct {
	Command string
	Args    []string
}

type Option

type Option func(*Step)

func Env

func Env(e ...string) Option

func Exec

func Exec(command string, args ...string) Option

func InExec

func InExec(hook func() error) Option

func PostExec

func PostExec(hook func(exitErr error) error) Option

func PreExec

func PreExec(hook func() error) Option

func Stderr

func Stderr(w io.Writer) Option

func Stdin

func Stdin(r io.Reader) Option

func Stdout

func Stdout(w io.Writer) Option

func Workdir

func Workdir(path string) Option

func Write

func Write(data []byte) Option

type Options

type Options []Option

func NewOptions

func NewOptions() Options

func (Options) Add

func (o Options) Add(options ...Option) Options

type Step

type Step struct {
	Exec      Execution
	PreExec   func() error
	InExec    func() error
	PostExecs []func(error) error
	Stdout    io.Writer
	Stderr    io.Writer
	Stdin     io.Reader
	Workdir   string
	Env       []string
	WriteData []byte
}

func New

func New(options ...Option) *Step

type Steps

type Steps []*Step

func NewSteps

func NewSteps(steps ...*Step) Steps

func (*Steps) Add

func (s *Steps) Add(steps ...*Step) Steps

Jump to

Keyboard shortcuts

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