(root *yaml.Node)
| 77 | } |
| 78 | |
| 79 | func getVersion(root *yaml.Node) string { |
| 80 | if root.Kind != yaml.DocumentNode || len(root.Content) == 0 { |
| 81 | return "" |
| 82 | } |
| 83 | mapping := root.Content[0] |
| 84 | if mapping.Kind != yaml.MappingNode { |
| 85 | return "" |
| 86 | } |
| 87 | |
| 88 | for i := 0; i < len(mapping.Content); i += 2 { |
| 89 | if mapping.Content[i].Value == "version" { |
| 90 | return mapping.Content[i+1].Value |
| 91 | } |
| 92 | } |
| 93 | return "" |
| 94 | } |
| 95 | |
| 96 | func mergeYamlNodes(dst, src *yaml.Node) { |
| 97 | if dst.Kind != yaml.MappingNode || src.Kind != yaml.MappingNode { |
no outgoing calls
no test coverage detected