findProjectsSequence locates the "projects" sequence node in the mapping. Returns nil if not found.
(mapping *yaml.Node)
| 220 | // findProjectsSequence locates the "projects" sequence node in the mapping. |
| 221 | // Returns nil if not found. |
| 222 | func findProjectsSequence(mapping *yaml.Node) *yaml.Node { |
| 223 | for i := 0; i < len(mapping.Content)-1; i += 2 { |
| 224 | if mapping.Content[i].Value == "projects" { |
| 225 | return mapping.Content[i+1] |
| 226 | } |
| 227 | } |
| 228 | return nil |
| 229 | } |
| 230 | |
| 231 | // extractProjectEntries reads all project entries from the document. |
| 232 | func extractProjectEntries(doc *yaml.Node) []GlobalProjectEntry { |
no outgoing calls
no test coverage detected