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

Function createRange

internal/compose/documentLink.go:19–34  ·  view source on GitHub ↗
(t *token.Token, length int)

Source from the content-addressed store, hash-verified

17)
18
19func createRange(t *token.Token, length int) protocol.Range {
20 offset := 0
21 if t.Type == token.DoubleQuoteType {
22 offset = 1
23 }
24 return protocol.Range{
25 Start: protocol.Position{
26 Line: protocol.UInteger(t.Position.Line - 1),
27 Character: protocol.UInteger(t.Position.Column + offset - 1),
28 },
29 End: protocol.Position{
30 Line: protocol.UInteger(t.Position.Line - 1),
31 Character: protocol.UInteger(t.Position.Column + offset + length - 1),
32 },
33 }
34}
35
36func createLink(folderAbsolutePath string, wslDollarSign bool, node *token.Token) *protocol.DocumentLink {
37 file := node.Value

Callers 7

createLinkFunction · 0.70
createImageLinkFunction · 0.70
createVolumeFileLinksFunction · 0.70
createModelLinkFunction · 0.70
createYamlHoverFunction · 0.70
DefinitionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected