MCPcopy Create free account
hub / github.com/docker/docker-language-server / createdNestedLink

Function createdNestedLink

internal/compose/documentLink.go:61–72  ·  view source on GitHub ↗
(folderAbsolutePath string, wslDollarSign bool, serviceNode *ast.MappingValueNode, parent, child string)

Source from the content-addressed store, hash-verified

59}
60
61func createdNestedLink(folderAbsolutePath string, wslDollarSign bool, serviceNode *ast.MappingValueNode, parent, child string) *protocol.DocumentLink {
62 if resolveAnchor(serviceNode.Key).GetToken().Value == parent {
63 if mappingNode, ok := resolveAnchor(serviceNode.Value).(*ast.MappingNode); ok {
64 for _, buildAttribute := range mappingNode.Values {
65 if resolveAnchor(buildAttribute.Key).GetToken().Value == child {
66 return createFileLink(folderAbsolutePath, wslDollarSign, buildAttribute)
67 }
68 }
69 }
70 }
71 return nil
72}
73
74func createImageLink(serviceNode *ast.MappingValueNode) *protocol.DocumentLink {
75 if resolveAnchor(serviceNode.Key).GetToken().Value == "image" {

Callers 1

scanForLinksFunction · 0.85

Calls 2

resolveAnchorFunction · 0.85
createFileLinkFunction · 0.85

Tested by

no test coverage detected