{"modulePath":"github.com/go-Task/Task","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package task\n\n## Constants\n\n```go\nconst (\n\t// TaskFilePath is the default Taskfile\n\tTaskFilePath = \"Taskfile\"\n\t// MaximumTaskCall is the max number of times a task can be called.\n\t// This exists to prevent infinite loops on cyclic dependencies\n\tMaximumTaskCall = 100\n)\n```\n\n## Variables\n\n```go\nvar (\n\t// ErrCantUnmarshalCmd is returned for invalid command YAML\n\tErrCantUnmarshalCmd = errors.New(\"task: can't unmarshal cmd value\")\n\t// ErrCantUnmarshalDep is returned for invalid dependency YAML\n\tErrCantUnmarshalDep = errors.New(\"task: can't unmarshal dep value\")\n)\n```\n\n```go\nvar (\n\t// ErrCantUnmarshalVar is returned for invalid var YAML.\n\tErrCantUnmarshalVar = errors.New(\"task: can't unmarshal var value\")\n)\n```\n\n```go\nvar (\n\t// ErrTaskfileAlreadyExists is returned on creating a Taskfile if one already exists\n\tErrTaskfileAlreadyExists = errors.New(\"task: A Taskfile already exists\")\n)\n```\n\n```go\nvar (\n\t// TaskvarsFilePath file containing additional variables.\n\tTaskvarsFilePath = \"Taskvars\"\n)\n```\n\n## Functions\n\n```go\nfunc InitTaskfile(w io.Writer, path string) error\n```\nInitTaskfile Taskfile creates a new Taskfile\n\n## Types\n\n```go\ntype Call struct {\n\tTask string\n\tVars Vars\n}\n```\nCall is the parameters to a task call\n\n```go\ntype Cmd struct {\n\tCmd    string\n\tSilent bool\n\tTask   string\n\tVars   Vars\n}\n```\nCmd is a task command\n\n```go\nfunc (c *Cmd) UnmarshalYAML(unmarshal func(interface{}) error) error\n```\nUnmarshalYAML implements yaml.Unmarshaler interface\n\n```go\ntype Dep struct {\n\tTask string\n\tVars Vars\n}\n```\nDep is a task dependency\n\n```go\nfunc (d *Dep) UnmarshalYAML(unmarshal func(interface{}) error) error\n```\nUnmarshalYAML implements yaml.Unmarshaler interface\n\n```go\ntype Executor struct {\n\tTasks   Tasks\n\tDir     string\n\tForce   bool\n\tWatch   bool\n\tVerbose bool\n\tSilent  bool\n\n\tContext context.Context\n\n\tStdin  io.Reader\n\tStdout io.Writer\n\tStderr io.Writer\n\t// contains filtered or unexported fields\n}\n```\nExecutor executes a Taskfile\n\n```go\nfunc (e *Executor) CompiledTask(call Call) (*Task, error)\n```\nCompiledTask returns a copy of a task, but replacing variables in almost all properties using the Go template package.\n\n```go\nfunc (e *Executor) PrintTasksHelp()\n```\nPrintTasksHelp prints help os tasks that have a description\n\n```go\nfunc (e *Executor) ReadTaskfile() error\n```\nReadTaskfile parses Taskfile from the disk\n\n```go\nfunc (e *Executor) Run(calls ...Call) error\n```\nRun runs Task\n\n```go\nfunc (e *Executor) RunTask(ctx context.Context, call Call) error\n```\nRunTask runs a task by its name\n\n```go\ntype MaximumTaskCallExceededError struct {\n\t// contains filtered or unexported fields\n}\n```\nMaximumTaskCallExceededError is returned when a task is called too many times. In this case you probably have a cyclic dependendy or infinite loop\n\n```go\nfunc (e *MaximumTaskCallExceededError) Error() string\n```\n\n```go\ntype Task struct {\n\tTask      string\n\tCmds      []*Cmd\n\tDeps      []*Dep\n\tDesc      string\n\tSources   []string\n\tGenerates []string\n\tStatus    []string\n\tDir       string\n\tVars      Vars\n\tEnv       Vars\n\tSilent    bool\n\tMethod    string\n}\n```\nTask represents a task\n\n```go\ntype Tasks map[string]*Task\n```\nTasks representas a group of tasks\n\n```go\ntype Var struct {\n\tStatic string\n\tSh     string\n}\n```\nVar represents either a static or dynamic variable.\n\n```go\nfunc (v *Var) UnmarshalYAML(unmarshal func(interface{}) error) error\n```\nUnmarshalYAML implements yaml.Unmarshaler interface.\n\n```go\ntype Vars map[string]Var\n```\nVars is a string\\[string] variables map.\n\n","path":"github.com/go-Task/Task","name":"task","synopsis":"","isRedistributable":true}
