MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / deepCopyYAMLNode

Function deepCopyYAMLNode

sdk/pluginhost/host.go:287–299  ·  view source on GitHub ↗
(node *yaml.Node)

Source from the content-addressed store, hash-verified

285}
286
287func deepCopyYAMLNode(node *yaml.Node) *yaml.Node {
288 if node == nil {
289 return &yaml.Node{}
290 }
291 copyNode := *node
292 if len(node.Content) > 0 {
293 copyNode.Content = make([]*yaml.Node, 0, len(node.Content))
294 for _, child := range node.Content {
295 copyNode.Content = append(copyNode.Content, deepCopyYAMLNode(child))
296 }
297 }
298 return &copyNode
299}

Callers 1

pluginConfigsToInternalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected