(file *ast.File, dependencyType string)
| 511 | } |
| 512 | |
| 513 | func findDependencies(file *ast.File, dependencyType string) []string { |
| 514 | services := []string{} |
| 515 | for _, documentNode := range file.Docs { |
| 516 | if mappingNode, ok := documentNode.Body.(*ast.MappingNode); ok { |
| 517 | for _, n := range mappingNode.Values { |
| 518 | if s, ok := n.Key.(*ast.StringNode); ok { |
| 519 | if s.Value == dependencyType { |
| 520 | if mappingNode, ok := n.Value.(*ast.MappingNode); ok { |
| 521 | for _, service := range mappingNode.Values { |
| 522 | services = append(services, service.Key.GetToken().Value) |
| 523 | } |
| 524 | } |
| 525 | } |
| 526 | } |
| 527 | } |
| 528 | } |
| 529 | } |
| 530 | return services |
| 531 | } |
| 532 | |
| 533 | func findBuildStages(manager *document.Manager, dockerfileURI, dockerfilePath, prefix string) []completionItemText { |
| 534 | _, nodes := document.OpenDockerfile(context.Background(), manager, dockerfileURI, dockerfilePath) |
no outgoing calls
no test coverage detected