Help us shape the future of Go! Take the 2026 Go Developer Survey

task

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotInTemplate     = errors.New("not in a DataRobot template directory")
	ErrNoTaskFilesFound  = errors.New("no Taskfiles found in child directories")
	ErrTaskfileHasDotenv = errors.New("existing Taskfile already has dotenv directive")
)

Functions

func ExitWithError added in v0.1.7

func ExitWithError(err error)

Types

type Discovery

type Discovery struct {
	RootTaskfileName string
}

func NewTaskDiscovery

func NewTaskDiscovery(rootTaskfileName string) *Discovery

func (*Discovery) Discover

func (d *Discovery) Discover(root string, maxDepth int) (string, error)

type RunOpts

type RunOpts struct {
	Parallel    bool
	WatchTask   bool
	AnswerYes   bool
	Silent      bool
	ExitCode    bool
	Concurrency int
}

func (*RunOpts) RunArgs

func (o *RunOpts) RunArgs() []string

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner uses Taskfile to run template tasks

func NewTaskRunner

func NewTaskRunner(opts RunnerOpts) *Runner

func (*Runner) Installed

func (r *Runner) Installed() bool

func (*Runner) ListTasks

func (r *Runner) ListTasks() ([]Task, error)

func (*Runner) Run

func (r *Runner) Run(tasks []string, opts RunOpts) error

type RunnerOpts

type RunnerOpts struct {
	BinaryName string
	Dir        string
	Taskfile   string
	Stdout     *os.File
	Stderr     *os.File
	Stdin      *os.File
}

type Task

type Task struct {
	Name     string   `json:"name"`
	Desc     string   `json:"desc"`
	Summary  string   `json:"summary"`
	Aliases  []string `json:"aliases"`
	UpToDate bool     `json:"up_to_date"`
	Location struct {
		Line     int    `json:"line"`
		Column   int    `json:"column"`
		Taskfile string `json:"taskfile"`
	} `json:"location"`
}

Jump to

Keyboard shortcuts

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