exec

package
v0.0.0-...-ecdd562 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package exec provides an Executor type for executing a series of commands that represent command line programs. This allows the creation of single purpose binaries instead of the multipurpose runme binary program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

Executor executes a series of command line arguments.

func New

func New(seqs []*config.Sequence, startAt string, fs ReadWriter, vals map[string]string) (*Executor, error)

New creates a new Executor.

func (*Executor) FailedNode

func (e *Executor) FailedNode() string

FailedNode is the node that was run and failed. This is an empty string if no node failed.

func (*Executor) Run

func (e *Executor) Run(c *config.Config, vals map[string]string) error

Run runs the commands help in "c" and uses "vals" to do substiution for template arguments.

type ReadWriter

type ReadWriter interface {
	fs.ReadFileFS
	gfs.Writer
}

ReadWriter is a file system with ReadFile() and WriteFile().

Jump to

Keyboard shortcuts

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