mirror of
https://github.com/go-task/task.git
synced 2026-06-29 23:55:18 +00:00
fix: deep copying pointers inside slices (#1072)
This commit is contained in:
@@ -131,6 +131,9 @@ func (t *Task) UnmarshalYAML(node *yaml.Node) error {
|
||||
// DeepCopy creates a new instance of Task and copies
|
||||
// data by value from the source struct.
|
||||
func (t *Task) DeepCopy() *Task {
|
||||
if t == nil {
|
||||
return nil
|
||||
}
|
||||
c := &Task{
|
||||
Task: t.Task,
|
||||
Cmds: deepCopySlice(t.Cmds),
|
||||
|
||||
Reference in New Issue
Block a user