mirror of
https://github.com/go-task/task.git
synced 2025-12-03 23:00:00 +02:00
fix: deep copying pointers inside slices (#1072)
This commit is contained in:
@@ -18,6 +18,16 @@ type Precondition struct {
|
||||
Msg string
|
||||
}
|
||||
|
||||
func (p *Precondition) DeepCopy() *Precondition {
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
return &Precondition{
|
||||
Sh: p.Sh,
|
||||
Msg: p.Msg,
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalYAML implements yaml.Unmarshaler interface.
|
||||
func (p *Precondition) UnmarshalYAML(node *yaml.Node) error {
|
||||
switch node.Kind {
|
||||
|
||||
Reference in New Issue
Block a user