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

Function configHover

internal/compose/hover.go:156–171  ·  view source on GitHub ↗
(doc document.ComposeDocument, mappingNode *ast.MappingNode, nodePath []ast.Node)

Source from the content-addressed store, hash-verified

154}
155
156func configHover(doc document.ComposeDocument, mappingNode *ast.MappingNode, nodePath []ast.Node) *protocol.Hover {
157 if len(nodePath) == 4 && nodePath[0].GetToken().Value == "services" {
158 // array string
159 if nodePath[2].GetToken().Value == "configs" {
160 t := nodePath[3].GetToken()
161 return createDependencyHover(doc, mappingNode, t, "configs", t.Value)
162 }
163 } else if len(nodePath) == 5 && nodePath[0].GetToken().Value == "services" {
164 // array object
165 if nodePath[2].GetToken().Value == "configs" && nodePath[3].GetToken().Value == "source" {
166 t := nodePath[4].GetToken()
167 return createDependencyHover(doc, mappingNode, t, "configs", t.Value)
168 }
169 }
170 return nil
171}
172
173func secretHover(doc document.ComposeDocument, mappingNode *ast.MappingNode, nodePath []ast.Node) *protocol.Hover {
174 if len(nodePath) >= 4 && nodePath[0].GetToken().Value == "services" {

Callers 1

HoverFunction · 0.85

Calls 1

createDependencyHoverFunction · 0.85

Tested by

no test coverage detected