package task
import "cuelang.org/go/internal/task"
Package task provides a registry for tasks to be used by commands.
Index ¶
Functions ¶
func Register ¶
func Register(key string, f RunnerFunc)
Register registers a task for cue commands.
Types ¶
type Context ¶
A Context provides context for running a task.
type Runner ¶
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, v cue.Value) (results interface{}, err error) }
A Runner defines a command type.
type RunnerFunc ¶
A RunnerFunc creates a Runner.
func Lookup ¶
func Lookup(key string) RunnerFunc
Lookup returns the RunnerFunc for a key.
Source Files ¶
task.go
- Version
- v0.0.4
- Published
- Jul 9, 2019
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 7 minutes ago –
Tools for package owners.