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

Method DeepCopy

taskfile/ast/cmd.go:26–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26func (c *Cmd) DeepCopy() *Cmd {
27 if c == nil {
28 return nil
29 }
30 return &Cmd{
31 Cmd: c.Cmd,
32 LogCmd: c.LogCmd,
33 Task: c.Task,
34 For: c.For.DeepCopy(),
35 If: c.If,
36 Silent: c.Silent,
37 Set: deepcopy.Slice(c.Set),
38 Shopt: deepcopy.Slice(c.Shopt),
39 Vars: c.Vars.DeepCopy(),
40 IgnoreError: c.IgnoreError,
41 Defer: c.Defer,
42 Platforms: deepcopy.Slice(c.Platforms),
43 }
44}
45
46func (c *Cmd) UnmarshalYAML(node *yaml.Node) error {
47 switch node.Kind {

Callers

nothing calls this directly

Calls 2

SliceFunction · 0.92
DeepCopyMethod · 0.65

Tested by

no test coverage detected