Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandInteractive ¶
CommandInteractive creates a new interactive command.
Types ¶
type ActiveCommandChain ¶
type ActiveCommandChain struct {
// contains filtered or unexported fields
}
ActiveCommandChain is an active command chain.
func (*ActiveCommandChain) Add ¶
func (a *ActiveCommandChain) Add(f func() error)
Add adds a new function to the runner.
func (ActiveCommandChain) Exec ¶
func (a ActiveCommandChain) Exec() error
Exec executes the command chain. The first errored function terminates the chain and the error is returned. Otherwise, returns nil.
func (*ActiveCommandChain) Stage ¶
func (a *ActiveCommandChain) Stage(s string)
Stage sets the current stage of the runner.
func (*ActiveCommandChain) Stagef ¶
func (a *ActiveCommandChain) Stagef(format string, s ...interface{})
Stagef is like stage with string format.
type CommandChain ¶
type CommandChain interface { // Init initiates a new runner using the current instance. Init() *ActiveCommandChain // Logger returns the instance logger. Logger() *log.Entry }
CommandChain is a chain of commands. commands are executed in order.
Click to show internal directories.
Click to hide internal directories.