import "cuelang.org/go/internal/task"
Package task provides a registry for tasks to be used by commands.
func Register(key string, f RunnerFunc)
Register registers a task for cue commands.
type Context struct { Context context.Context Stdin io.Reader Stdout io.Writer Stderr io.Writer Obj cue.Value Err errors.Error }
A Context provides context for running a task.
type Runner interface { // Runner runs given the current value and returns a new value which is to // be unified with the original result. Run(ctx *Context) (results interface{}, err error) }
A Runner defines a command type.
A RunnerFunc creates a Runner.
func Lookup(key string) RunnerFunc
Lookup returns the RunnerFunc for a key.
Package task imports 8 packages (graph) and is imported by 12 packages. Updated 2021-01-25. Refresh now. Tools for package owners.