MCPcopy Index your code
hub / github.com/devspace-sh/devspace / NewNode

Function NewNode

pkg/devspace/config/loader/patch/patch.go:37–50  ·  view source on GitHub ↗
(raw *interface{})

Source from the content-addressed store, hash-verified

35}
36
37func NewNode(raw *interface{}) (*yaml.Node, error) {
38 doc, err := yaml.Marshal(raw)
39 if err != nil {
40 return nil, fmt.Errorf("failed marshaling struct: %+v\n\n%s", raw, err)
41 }
42
43 var node yaml.Node
44 err = yamlutil.Unmarshal(doc, &node)
45 if err != nil {
46 return nil, fmt.Errorf("failed unmarshaling doc: %s\n\n%s", string(doc), err)
47 }
48
49 return &node, nil
50}
51
52func TransformPath(path string) string {
53 if path == "" {

Callers 2

applyDeployPatchesMethod · 0.92
ApplyPatchesOnObjectFunction · 0.92

Calls 2

UnmarshalFunction · 0.92
ErrorfMethod · 0.45

Tested by

no test coverage detected