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

Function createLink

internal/compose/documentLink.go:36–44  ·  view source on GitHub ↗
(folderAbsolutePath string, wslDollarSign bool, node *token.Token)

Source from the content-addressed store, hash-verified

34}
35
36func createLink(folderAbsolutePath string, wslDollarSign bool, node *token.Token) *protocol.DocumentLink {
37 file := node.Value
38 u, path := types.Concatenate(folderAbsolutePath, file, wslDollarSign)
39 return &protocol.DocumentLink{
40 Range: createRange(node, len(file)),
41 Target: types.CreateStringPointer(u),
42 Tooltip: types.CreateStringPointer(path),
43 }
44}
45
46func createFileLink(folderAbsolutePath string, wslDollarSign bool, serviceNode *ast.MappingValueNode) *protocol.DocumentLink {
47 attributeValue := stringNode(serviceNode.Value)

Callers 3

createFileLinkFunction · 0.85
createFileLinksFunction · 0.85
scanForLinksFunction · 0.85

Calls 3

ConcatenateFunction · 0.92
CreateStringPointerFunction · 0.92
createRangeFunction · 0.70

Tested by

no test coverage detected