Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAlreadyRun error is throwed with panic on Push or Run invocation // after Run was invoked at least once ErrAlreadyRun = errors.New("actions already fired") )
Functions ¶
This section is empty.
Types ¶
type ActionStack ¶
type ActionStack struct {
// contains filtered or unexported fields
}
ActionStack is a stack of actions which are executed in reverse order they were added
func (*ActionStack) Push ¶
func (a *ActionStack) Push(elems ...Action)
Push adds new action on top of stack. Last added action will be executed by Run() first.
func (*ActionStack) Run ¶
func (a *ActionStack) Run()
Run executes pushed actions in reverse order (FILO)
Click to show internal directories.
Click to hide internal directories.