(node *yaml.Node)
| 245 | } |
| 246 | |
| 247 | func nodeToProjectEntry(node *yaml.Node) GlobalProjectEntry { |
| 248 | var entry GlobalProjectEntry |
| 249 | if node.Kind != yaml.MappingNode { |
| 250 | return entry |
| 251 | } |
| 252 | for i := 0; i < len(node.Content)-1; i += 2 { |
| 253 | switch node.Content[i].Value { |
| 254 | case "id": |
| 255 | entry.ID = node.Content[i+1].Value |
| 256 | case "name": |
| 257 | entry.Name = node.Content[i+1].Value |
| 258 | case "path": |
| 259 | entry.Path = node.Content[i+1].Value |
| 260 | } |
| 261 | } |
| 262 | return entry |
| 263 | } |
| 264 | |
| 265 | func checkDuplicateID(doc *yaml.Node, id string) error { |
| 266 | entries := extractProjectEntries(doc) |
no outgoing calls
no test coverage detected