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

Function createLocalFileLink

internal/compose/documentLink.go:164–169  ·  view source on GitHub ↗
(folderAbsolutePath, fsPath string, wslDollarSign bool)

Source from the content-addressed store, hash-verified

162}
163
164func createLocalFileLink(folderAbsolutePath, fsPath string, wslDollarSign bool) (uri, path string) {
165 if filepath.IsAbs(fsPath) {
166 return fmt.Sprintf("file:///%v", strings.TrimPrefix(filepath.ToSlash(fsPath), "/")), fsPath
167 }
168 return types.Concatenate(folderAbsolutePath, fsPath, wslDollarSign)
169}
170
171func createObjectFileLink(folderAbsolutePath string, wslDollarSign bool, serviceNode *ast.MappingValueNode) *protocol.DocumentLink {
172 if resolveAnchor(serviceNode.Key).GetToken().Value == "file" {

Callers 1

createVolumeFileLinksFunction · 0.85

Calls 1

ConcatenateFunction · 0.92

Tested by

no test coverage detected