mirror of
https://github.com/go-task/task.git
synced 2025-11-06 09:09:13 +02:00
@@ -3,6 +3,7 @@ package taskfile
|
||||
// Taskfile represents a Taskfile.yml
|
||||
type Taskfile struct {
|
||||
Version string
|
||||
Vars Vars
|
||||
Tasks Tasks
|
||||
}
|
||||
|
||||
@@ -15,12 +16,14 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
|
||||
var taskfile struct {
|
||||
Version string
|
||||
Vars Vars
|
||||
Tasks Tasks
|
||||
}
|
||||
if err := unmarshal(&taskfile); err != nil {
|
||||
return err
|
||||
}
|
||||
tf.Version = taskfile.Version
|
||||
tf.Vars = taskfile.Vars
|
||||
tf.Tasks = taskfile.Tasks
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user