MCPcopy
hub / github.com/cortexlabs/cortex / DeepCopy

Function DeepCopy

pkg/lib/structs/deepcopy.go:24–30  ·  view source on GitHub ↗
(dst, src interface{})

Source from the content-addressed store, hash-verified

22)
23
24func DeepCopy(dst, src interface{}) error {
25 var buf bytes.Buffer
26 if err := gob.NewEncoder(&buf).Encode(src); err != nil {
27 return err
28 }
29 return gob.NewDecoder(bytes.NewBuffer(buf.Bytes())).Decode(dst)
30}

Callers 3

DeepCopyMethod · 0.92
DeepCopyMethod · 0.92
TestDeepCopyFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDeepCopyFunction · 0.68