1
0
mirror of https://github.com/go-task/task.git synced 2025-06-23 00:38:19 +02:00

feat: store namespace directly in include

This commit is contained in:
Pete Davison
2024-01-04 00:17:30 +00:00
parent 5fc66293b0
commit d684e59b6a
3 changed files with 29 additions and 18 deletions

View File

@ -14,6 +14,7 @@ import (
// Include represents information about included taskfiles
type Include struct {
Namespace string
Taskfile string
Dir string
Optional bool
@ -45,6 +46,7 @@ func (includes *Includes) UnmarshalYAML(node *yaml.Node) error {
if err := valueNode.Decode(&v); err != nil {
return err
}
v.Namespace = keyNode.Value
includes.Set(keyNode.Value, v)
}
return nil
@ -128,6 +130,7 @@ func (include *Include) DeepCopy() *Include {
return nil
}
return &Include{
Namespace: include.Namespace,
Taskfile: include.Taskfile,
Dir: include.Dir,
Optional: include.Optional,