Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrMissingInput = errors.New("missing input")
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface { Combinable Runner Printer fmt.Stringer // Required for checksums. }
Action defines a type which can be executed, both in live mode and in dry-run mode, as well as combine with other Action implementers.
type Command ¶
type Command string
Command is a string which is interpreted as a shell script.
func (Command) After ¶
After creates a new action which executes the provided action and then the wrapped command.
func (Command) AndThen ¶
AndThen creates a new action which executes the wrapped command and then the provided action.
type Commands ¶
Commands is a group of string commands which are executed in order.
func (Commands) After ¶
After creates a new action which executes the provided action and then the wrapped list of commands.
func (Commands) AndThen ¶
AndThen creates a new action which executes the wrapped list of commands and then the provided action.
type Function ¶
Function is a wrapper for a Go-based action.
func (Function) After ¶
After creates a new action which executes the provided action and then the wrapped function.
func (Function) AndThen ¶
AndThen creates a new action which executes the wrapped function and then the provided action.
type NoOp ¶ added in v0.2.1
type NoOp struct{}
func (NoOp) After ¶ added in v0.2.1
After creates a new action which executes the provided action and then the no-op function.
func (NoOp) AndThen ¶ added in v0.2.1
AndThen creates a new action which executes the no-op function and then the provided action.
type Process ¶
Process is a child process.
func (*Process) After ¶
After creates a new action which executes the provided action and then the wrapped function.
func (*Process) AndThen ¶
AndThen creates a new action which executes the wrapped function and then the provided action.
type Sequence ¶
Sequence is an action which is solely comprised of a sequence of other action types.
func (Sequence) After ¶
After creates a new action which executes the provided action and then all of the actions in this sequence.
func (Sequence) AndThen ¶
AndThen creates a new action which executes all actions in this sequence and then the provided action.
type WithDescription ¶
WithDescription is a utility type for wrapping an action with a description that replaces a 'Print' call.
func (WithDescription[T]) After ¶
func (d WithDescription[T]) After(a Action) Action
After creates a new action which executes the provided action and then the wrapped action.
func (WithDescription[T]) AndThen ¶
func (d WithDescription[T]) AndThen(a Action) Action
AndThen creates a new action which executes the wrapped action and then the provided action.
func (WithDescription[T]) Run ¶
func (d WithDescription[T]) Run(ctx context.Context) error
Run executes the underlying action.
func (WithDescription[T]) Sprint ¶
func (d WithDescription[T]) Sprint() string
Sprint displays the action without actually executing it.
func (WithDescription[T]) String ¶ added in v0.1.2
func (d WithDescription[T]) String() string