DeepCopy creates a new instance of IncludedTaskfile and copies data by value from the source struct.
()
| 194 | // DeepCopy creates a new instance of IncludedTaskfile and copies |
| 195 | // data by value from the source struct. |
| 196 | func (include *Include) DeepCopy() *Include { |
| 197 | if include == nil { |
| 198 | return nil |
| 199 | } |
| 200 | return &Include{ |
| 201 | Namespace: include.Namespace, |
| 202 | Taskfile: include.Taskfile, |
| 203 | Dir: include.Dir, |
| 204 | Optional: include.Optional, |
| 205 | Internal: include.Internal, |
| 206 | Excludes: deepcopy.Slice(include.Excludes), |
| 207 | AdvancedImport: include.AdvancedImport, |
| 208 | Vars: include.Vars.DeepCopy(), |
| 209 | Flatten: include.Flatten, |
| 210 | Aliases: deepcopy.Slice(include.Aliases), |
| 211 | Checksum: include.Checksum, |
| 212 | } |
| 213 | } |