MCPcopy Create free account
hub / github.com/github/gh-aw / canonicalizeNestedImportPath

Function canonicalizeNestedImportPath

pkg/parser/import_bfs.go:457–466  ·  view source on GitHub ↗
(nestedImportPath, nestedBaseDir, baseDir string, nestedRemoteOrigin *remoteImportOrigin, nestedFullPath string)

Source from the content-addressed store, hash-verified

455}
456
457func canonicalizeNestedImportPath(nestedImportPath, nestedBaseDir, baseDir string, nestedRemoteOrigin *remoteImportOrigin, nestedFullPath string) string {
458 if nestedRemoteOrigin != nil || nestedBaseDir == baseDir {
459 return nestedImportPath
460 }
461 rel, err := filepath.Rel(baseDir, nestedFullPath)
462 if err != nil {
463 return nestedImportPath
464 }
465 return filepath.ToSlash(rel)
466}
467
468func enqueueNestedVisitedPath(state *importBFSState, nestedImportPath, nestedFullPath, nestedSectionName, baseDir string, inputs map[string]any, nestedRemoteOrigin *remoteImportOrigin) error {
469 if !setutil.Contains(state.visited, nestedFullPath) {

Callers 1

enqueueNestedImportEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected