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

Method isGoProjectPackage

src/resolution/index.ts:3700–3704  ·  view source on GitHub ↗

* True when the Go file imports `qualifier` — by its last path segment or * an alias — from a package of one of the project's own modules.

(ref: UnresolvedRef, qualifier: string)

Source from the content-addressed store, hash-verified

3698 * an alias — from a package of one of the project's own modules.
3699 */
3700 private isGoProjectPackage(ref: UnresolvedRef, qualifier: string): boolean {
3701 return this.context
3702 .getImportMappings(ref.filePath, ref.language)
3703 .some((imp) => imp.localName === qualifier && this.context.getGoPackageDir?.(imp.source, ref.filePath) != null);
3704 }
3705
3706 /**
3707 * Check if reference is to a built-in or external symbol

Callers 1

isBuiltInOrExternalMethod · 0.95

Calls 2

getImportMappingsMethod · 0.80
getGoPackageDirMethod · 0.80

Tested by

no test coverage detected