Documentation
¶
Index ¶
- Variables
- func AddTask(t *Task)
- type Task
- func (g *Task) Catch(f func(error) error) *Task
- func (g *Task) Chdir(path string) *Task
- func (g *Task) End() *Task
- func (g *Task) Env(args ...string) *Task
- func (g *Task) Exec(args ...interface{}) *Task
- func (g *Task) Execute() chan steps.Result
- func (g *Task) Exists(path string) *Task
- func (g *Task) No() *Task
- func (g *Task) Parallel(taskNames ...string) *Task
- func (g *Task) Print(args ...interface{}) *Task
- func (g *Task) Prompt(v string) *Task
- func (g *Task) Result(f func(interface{})) *Task
- func (g *Task) Run(taskName string) *Task
- func (g *Task) Signaler(t ...os.Signal) *Task
- func (g *Task) Sleep(duration string) *Task
- func (g *Task) Watch(paths ...string) *Task
- func (g *Task) Yes() *Task
Constants ¶
This section is empty.
Variables ¶
View Source
var Tasks []*Task
Tasks is our global task name to *Task map.
Functions ¶
Types ¶
type Task ¶
type Task struct { Name string // contains filtered or unexported fields }
Task is a named container for steps.
func (*Task) Print ¶ added in v0.3.0
Print prints either the args passed or the previous task's result.
func (*Task) Prompt ¶ added in v0.3.0
Prompt prompts (Y/N) using the passed value or the result of the previous task.
func (*Task) Signaler ¶ added in v0.2.0
Signaler redirects a given signal to kill steps in the task.
func (*Task) Sleep ¶
Sleep delays time by the given string, adhering to https://pkg.go.dev/time#ParseDuration
Click to show internal directories.
Click to hide internal directories.