MCPcopy
hub / github.com/go-task/task / DeepCopy

Method DeepCopy

taskfile/ast/include.go:196–213  ·  view source on GitHub ↗

DeepCopy creates a new instance of IncludedTaskfile and copies data by value from the source struct.

()

Source from the content-addressed store, hash-verified

194// DeepCopy creates a new instance of IncludedTaskfile and copies
195// data by value from the source struct.
196func (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}

Callers

nothing calls this directly

Calls 2

SliceFunction · 0.92
DeepCopyMethod · 0.65

Tested by

no test coverage detected