task

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sort

func Sort(taskNames []Name)

Types

type Builtin

type Builtin struct {
	OnExec func(stdout, stderr io.Writer) error
}

func (Builtin) Exec

func (h Builtin) Exec(workDir string, params template.Scope, stdout, stderr io.Writer) error

type Meta

type Meta struct {
	Doc string
}

type Name

type Name string

func (Name) IsBuiltIn

func (n Name) IsBuiltIn() bool

func (Name) Split

func (n Name) Split() (types.Alias, string)

type Script

type Script struct {
	Script string
	Shell  string
	Scope  *template.Scope
}

func (Script) Exec

func (s Script) Exec(workDir string, values template.Scope, stdout, stderr io.Writer) error

type Table

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

func NewTable

func NewTable() Table

func (Table) AddDoc

func (tt Table) AddDoc(taskName Name, s string)

func (Table) AddTask

func (tt Table) AddTask(name Name, task Task)

func (Table) ForEach

func (tt Table) ForEach(f func(taskName Name, task Task, meta Meta) error) error

func (Table) ForEachSorted

func (tt Table) ForEachSorted(f func(taskName Name, task Task, meta Meta) error) error

func (Table) ImportTasks

func (tt Table) ImportTasks(alias types.Alias, other Table)

func (Table) LookupTask

func (tt Table) LookupTask(name Name) (Task, bool)

type Task

type Task interface {
	Exec(workDir string, params template.Scope, stdout, stderr io.Writer) error
}

type TaskNames

type TaskNames []Name

func (TaskNames) Len

func (names TaskNames) Len() int

func (TaskNames) Less

func (names TaskNames) Less(i, j int) bool

func (TaskNames) Swap

func (names TaskNames) Swap(i, j int)

Notes

Bugs

  • Suppress logging from the library. This prevents using standard logger anywhere else.

Jump to

Keyboard shortcuts

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