github.com/go-task/task/v3/taskfile/ast
No package summary is available.
Package
Files: 18. Third party imports: 6. Imports from organisation: 0. Tests: 0. Benchmarks: 0.
Constants
Vars
ErrIncludedTaskfilesCantHaveDotenvs is returned when a included Taskfile contains dotenvs
Types
Cmd
Cmd is a task command
| Field name | Field type | Comment |
|---|---|---|
| Cmd |
|
No comment on field. |
| Task |
|
No comment on field. |
| For |
|
No comment on field. |
| Silent |
|
No comment on field. |
| Set |
|
No comment on field. |
| Shopt |
|
No comment on field. |
| Vars |
|
No comment on field. |
| IgnoreError |
|
No comment on field. |
| Defer |
|
No comment on field. |
| Platforms |
|
No comment on field. |
Defer
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Cmd |
|
No comment on field. |
| Task |
|
No comment on field. |
| Vars |
|
No comment on field. |
| Silent |
|
No comment on field. |
Dep
Dep is a task dependency
| Field name | Field type | Comment |
|---|---|---|
| Task |
|
No comment on field. |
| For |
|
No comment on field. |
| Vars |
|
No comment on field. |
| Silent |
|
No comment on field. |
ErrInvalidPlatform
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Platform |
|
No comment on field. |
For
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| From |
|
No comment on field. |
| List |
|
No comment on field. |
| Matrix |
|
No comment on field. |
| Var |
|
No comment on field. |
| Split |
|
No comment on field. |
| As |
|
No comment on field. |
Glob
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Glob |
|
No comment on field. |
| Negate |
|
No comment on field. |
Location
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Line |
|
No comment on field. |
| Column |
|
No comment on field. |
| Taskfile |
|
No comment on field. |
Output
Output of the Task output
| Field name | Field type | Comment |
|---|---|---|
| Name |
|
Name of the Output. |
| Group |
|
Group specific style |
OutputGroup
OutputGroup is the style options specific to the Group style.
| Field name | Field type | Comment |
|---|---|---|
| Begin |
|
No comment on field. |
| ErrorOnly |
|
No comment on field. |
Platform
Platform represents GOOS and GOARCH values
| Field name | Field type | Comment |
|---|---|---|
| OS |
|
No comment on field. |
| Arch |
|
No comment on field. |
Precondition
Precondition represents a precondition necessary for a task to run
| Field name | Field type | Comment |
|---|---|---|
| Sh |
|
No comment on field. |
| Msg |
|
No comment on field. |
Prompt
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
Requires
Requires represents a set of required variables necessary for a task to run
| Field name | Field type | Comment |
|---|---|---|
| Vars |
|
No comment on field. |
Task
Task represents a task
| Field name | Field type | Comment |
|---|---|---|
| Task |
|
No comment on field. |
| Cmds |
|
No comment on field. |
| Deps |
|
No comment on field. |
| Label |
|
No comment on field. |
| Desc |
|
No comment on field. |
| Prompt |
|
No comment on field. |
| Summary |
|
No comment on field. |
| Requires |
|
No comment on field. |
| Aliases |
|
No comment on field. |
| Sources |
|
No comment on field. |
| Generates |
|
No comment on field. |
| Status |
|
No comment on field. |
| Preconditions |
|
No comment on field. |
| Dir |
|
No comment on field. |
| Set |
|
No comment on field. |
| Shopt |
|
No comment on field. |
| Vars |
|
No comment on field. |
| Env |
|
No comment on field. |
| Dotenv |
|
No comment on field. |
| Silent |
|
No comment on field. |
| Interactive |
|
No comment on field. |
| Internal |
|
No comment on field. |
| Method |
|
No comment on field. |
| Prefix |
|
No comment on field. |
| IgnoreError |
|
No comment on field. |
| Run |
|
No comment on field. |
| Platforms |
|
No comment on field. |
| Watch |
|
No comment on field. |
| Location |
|
No comment on field. |
| Namespace |
|
Populated during merging |
| IncludeVars |
|
No comment on field. |
| IncludedTaskfileVars |
|
No comment on field. |
Taskfile
Taskfile is the abstract syntax tree for a Taskfile
| Field name | Field type | Comment |
|---|---|---|
| Location |
|
No comment on field. |
| Version |
|
No comment on field. |
| Output |
|
No comment on field. |
| Method |
|
No comment on field. |
| Includes |
|
No comment on field. |
| Set |
|
No comment on field. |
| Shopt |
|
No comment on field. |
| Vars |
|
No comment on field. |
| Env |
|
No comment on field. |
| Tasks |
|
No comment on field. |
| Silent |
|
No comment on field. |
| Dotenv |
|
No comment on field. |
| Run |
|
No comment on field. |
| Interval |
|
No comment on field. |
TaskfileGraph
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. | |
|
No comment on field. |
TaskfileVertex
A TaskfileVertex is a vertex on the Taskfile DAG.
| Field name | Field type | Comment |
|---|---|---|
| URI |
|
No comment on field. |
| Taskfile |
|
No comment on field. |
Var
Var represents either a static or dynamic variable.
| Field name | Field type | Comment |
|---|---|---|
| Value |
|
No comment on field. |
| Live |
|
No comment on field. |
| Sh |
|
No comment on field. |
| Ref |
|
No comment on field. |
| Dir |
|
No comment on field. |
VarsWithValidation
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Name |
|
No comment on field. |
| Enum |
|
No comment on field. |
Matrix, MatrixElement, MatrixRow
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| om |
|
No comment on field. |
| type |
|
No comment on field. |
| Ref |
|
No comment on field. |
| Value |
|
No comment on field. |
Include, Includes, IncludeElement
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Namespace |
|
No comment on field. |
| Taskfile |
|
No comment on field. |
| Dir |
|
No comment on field. |
| Optional |
|
No comment on field. |
| Internal |
|
No comment on field. |
| Aliases |
|
No comment on field. |
| Excludes |
|
No comment on field. |
| AdvancedImport |
|
No comment on field. |
| Vars |
|
No comment on field. |
| Flatten |
|
No comment on field. |
| Checksum |
|
No comment on field. |
| om |
|
No comment on field. |
| mutex |
|
No comment on field. |
| type |
|
No comment on field. |
Tasks, TaskElement
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| om |
|
No comment on field. |
| mutex |
|
No comment on field. |
| type |
|
No comment on field. |
Vars, VarElement
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| om |
|
No comment on field. |
| mutex |
|
No comment on field. |
| type |
|
No comment on field. |
Functions
func NewIncludes
NewIncludes creates a new instance of Includes and initializes it with the provided set of elements, if any. The elements are added in the order they are passed.
func NewMatrix
func NewTaskfileGraph
func NewTasks
NewTasks creates a new instance of Tasks and initializes it with the provided set of elements, if any. The elements are added in the order they are passed.
func NewVars
NewVars creates a new instance of Vars and initializes it with the provided set of elements, if any. The elements are added in the order they are passed.
func (*Cmd) DeepCopy
func (*Cmd) UnmarshalYAML
func (*Defer) UnmarshalYAML
func (*Dep) DeepCopy
func (*Dep) UnmarshalYAML
func (*ErrInvalidPlatform) Error
func (*For) DeepCopy
func (*For) UnmarshalYAML
func (*Glob) UnmarshalYAML
func (*Include) DeepCopy
DeepCopy creates a new instance of IncludedTaskfile and copies data by value from the source struct.
Uses: deepcopy.Slice.func (*Include) UnmarshalYAML
func (*Includes) All
All returns an iterator that loops over all task key-value pairs. Range calls the provided function for each include in the map. The function receives the include's key and value as arguments. If the function returns an error, the iteration stops and the error is returned.
func (*Includes) Get
Get returns the value the the include with the provided key and a boolean that indicates if the value was found or not. If the value is not found, the returned include is a zero value and the bool is false.
func (*Includes) Keys
Keys returns an iterator that loops over all task keys.
func (*Includes) Len
Len returns the number of includes in the Includes map.
func (*Includes) Set
Set sets the value of the include with the provided key to the provided value. If the include already exists, its value is updated. If the include does not exist, it is created.
func (*Includes) UnmarshalYAML
UnmarshalYAML implements the yaml.Unmarshaler interface.
Uses: errors.NewTaskfileDecodeError.func (*Includes) Values
Values returns an iterator that loops over all task values.
func (*Location) DeepCopy
func (*Matrix) All
All returns an iterator that loops over all task key-value pairs.
func (*Matrix) DeepCopy
func (*Matrix) Get
func (*Matrix) Keys
Keys returns an iterator that loops over all task keys.
func (*Matrix) Len
func (*Matrix) Set
func (*Matrix) UnmarshalYAML
func (*Matrix) Values
Values returns an iterator that loops over all task values.
func (*Output) IsSet
IsSet returns true if and only if a custom output style is set.
func (*Output) UnmarshalYAML
func (*OutputGroup) IsSet
IsSet returns true if and only if a custom output style is set.
func (*Platform) DeepCopy
func (*Platform) UnmarshalYAML
UnmarshalYAML implements yaml.Unmarshaler interface.
Uses: errors.NewTaskfileDecodeError.func (*Precondition) DeepCopy
func (*Precondition) UnmarshalYAML
UnmarshalYAML implements yaml.Unmarshaler interface.
Uses: errors.NewTaskfileDecodeError, fmt.Sprintf.func (*Prompt) UnmarshalYAML
func (*Requires) DeepCopy
func (*Task) DeepCopy
DeepCopy creates a new instance of Task and copies data by value from the source struct.
Uses: deepcopy.Slice.func (*Task) LocalName
func (*Task) Name
func (*Task) UnmarshalYAML
func (*Task) WildcardMatch
WildcardMatch will check if the given string matches the name of the Task and returns any wildcard values.
Uses: fmt.Sprintf, regexp.MustCompile, strings.Count, strings.ReplaceAll.func (*Taskfile) Merge
Merge merges the second Taskfile into the first
Uses: fmt.Errorf.func (*Taskfile) UnmarshalYAML
func (*TaskfileGraph) Merge
func (*TaskfileGraph) Visualize
func (*Tasks) All
All returns an iterator that loops over all task key-value pairs in the order specified by the sorter.
Uses: slices.Collect.func (*Tasks) Get
Get returns the value the the task with the provided key and a boolean that indicates if the value was found or not. If the value is not found, the returned task is a zero value and the bool is false.
func (*Tasks) Keys
Keys returns an iterator that loops over all task keys in the order specified by the sorter.
func (*Tasks) Len
Len returns the number of variables in the Tasks map.
func (*Tasks) Merge
func (*Tasks) Set
Set sets the value of the task with the provided key to the provided value. If the task already exists, its value is updated. If the task does not exist, it is created.
func (*Tasks) UnmarshalYAML
func (*Tasks) Values
Values returns an iterator that loops over all task values in the order specified by the sorter.
func (*Var) UnmarshalYAML
func (*Vars) All
All returns an iterator that loops over all task key-value pairs.
func (*Vars) DeepCopy
func (*Vars) Get
Get returns the value the the variable with the provided key and a boolean that indicates if the value was found or not. If the value is not found, the returned variable is a zero value and the bool is false.
func (*Vars) Keys
Keys returns an iterator that loops over all task keys.
func (*Vars) Len
Len returns the number of variables in the Vars map.
func (*Vars) Merge
Merge loops over other and merges it values with the variables in vars. If the include parameter is not nil and its it is an advanced import, the directory is set set to the value of the include parameter.
func (*Vars) Set
Set sets the value of the variable with the provided key to the provided value. If the variable already exists, its value is updated. If the variable does not exist, it is created.
func (*Vars) ToCacheMap
ToCacheMap converts Vars to an unordered map containing only the static variables
func (*Vars) UnmarshalYAML
func (*Vars) Values
Values returns an iterator that loops over all task values.
func (*VarsWithValidation) DeepCopy
func (*VarsWithValidation) UnmarshalYAML
UnmarshalYAML implements yaml.Unmarshaler interface.
Uses: errors.NewTaskfileDecodeError.Private functions
func taskNameWithNamespace
func taskfileHash
func parseArch
func parseOsOrArch
parseOsOrArch will check if the given input is a valid OS or Arch value. If so, it will store it. If not, an error is returned
References: fmt.Errorf, goext.IsKnownArch, goext.IsKnownOS.func parsePlatform
parsePlatform takes a string representing an OS/Arch combination (or either on their own) and parses it into the Platform struct. It returns an error if the input string is invalid. Valid combinations for input: OS, Arch, OS/Arch
References: strings.Split.Tests
Files: 1. Third party imports: 2. Imports from organisation: 0. Tests: 1. Benchmarks: 0.