gotask

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTaskfile added in v0.1.0

func RunTaskfile()

RunTaskfile delegates execution to the "task" runner if a Taskfile.yaml exists in the project. This allows gradual migration from Task to go-make by forwarding unknown commands to the existing Taskfile. Does nothing if no Taskfile is found.

func Tasks added in v0.7.0

func Tasks(globs ...string) Task

Tasks discovers tasks defined in the project's Taskfile.yaml (and any local `includes:`) by parsing the YAML directly, and exposes them as go-make Tasks that forward to the `task` binary. This makes Taskfile tasks discoverable in `make help` and runnable as first-class go-make tasks during migration. Returns an empty Task group when no Taskfile.yaml is present so it can be embedded unconditionally in a Makefile.

Discovery mirrors `task --list-all`: internal tasks and internal includes are omitted. Remote includes (http/git) are skipped, since listing them would require fetching — those tasks won't appear here, though RunTaskfile still forwards to them.

PERFORMANCE: the Taskfile(s) are parsed at construction time, i.e. on every `make` invocation (even for native tasks). Parsing YAML is cheap but not free, so prefer this only while migrating away from Task; once tasks are ported to go-make, drop the Tasks() call to avoid the per-invocation cost.

The optional globs select which discovered tasks to expose: a glob may be an exact task name ("build") or a pattern ("db:*"). A task is included when it matches any glob. When no globs are given, all tasks are exposed.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL