MCPcopy Create free account
hub / github.com/devspace-sh/devspace / createMappingNode

Function createMappingNode

pkg/devspace/config/loader/patch/operation.go:187–205  ·  view source on GitHub ↗
(property string, value *yaml.Node)

Source from the content-addressed store, hash-verified

185}
186
187func createMappingNode(property string, value *yaml.Node) *yaml.Node {
188 return &yaml.Node{
189 Kind: yaml.DocumentNode,
190 Content: []*yaml.Node{
191 {
192 Kind: yaml.MappingNode,
193 Tag: "!!map",
194 Content: []*yaml.Node{
195 {
196 Kind: yaml.ScalarNode,
197 Value: property,
198 Tag: "!!str",
199 },
200 value,
201 },
202 },
203 },
204 }
205}
206
207func getParents(doc *yaml.Node, path OpPath) ([]*yaml.Node, error) {
208 parentPath, err := yamlpath.NewPath(path.getParentPath())

Callers 1

PerformMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected