Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionApplier ¶
type OptionApplier func(o *option)
func WithExitOnError ¶
func WithExitOnError(exitOnError bool) OptionApplier
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func New ¶
func New(tasks []*Task, options ...OptionApplier) *Runner
type Task ¶
type Task struct {
Title string
Run func(callback TaskCallback) error
// PostRun runs after Run (even if Run failed) with result
PostRun func(result *Result)
Enable func() bool
Options []OptionApplier
// contains filtered or unexported fields
}
func NewTask ¶
func NewTask(title string, run func(callback TaskCallback) error, options ...OptionApplier) *Task
type TaskCallback ¶
type TaskList ¶
type TaskList struct {
Tasks []*Task
Options []OptionApplier
// contains filtered or unexported fields
}
func NewTaskList ¶
func NewTaskList(tasks []*Task, options ...OptionApplier) *TaskList
Click to show internal directories.
Click to hide internal directories.