MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / goModulePackageDir

Function goModulePackageDir

src/resolution/go-module.ts:77–81  ·  view source on GitHub ↗
(importPath: string, mod: GoModule, projectRoot: string)

Source from the content-addressed store, hash-verified

75 * directory followed by the rest of the import path.
76 */
77export function goModulePackageDir(importPath: string, mod: GoModule, projectRoot: string): string {
78 const modDir = path.relative(projectRoot, mod.rootDir).split(path.sep).join('/');
79 const rest = importPath === mod.modulePath ? '' : importPath.slice(mod.modulePath.length + 1);
80 return path.posix.join(modDir, rest);
81}

Callers 1

createContextMethod · 0.90

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected