Function
createMappingNode
(property string, value *yaml.Node)
Source from the content-addressed store, hash-verified
| 185 | } |
| 186 | |
| 187 | func 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 | |
| 207 | func getParents(doc *yaml.Node, path OpPath) ([]*yaml.Node, error) { |
| 208 | parentPath, err := yamlpath.NewPath(path.getParentPath()) |
Tested by
no test coverage detected