MCPcopy Create free account
hub / github.com/HashLoad/boss / GetNewPaths

Function GetNewPaths

utils/librarypath/librarypath.go:43–62  ·  view source on GitHub ↗
(paths []string, fullPath bool, rootPath string)

Source from the content-addressed store, hash-verified

41}
42
43func GetNewPaths(paths []string, fullPath bool, rootPath string) []string {
44 paths = cleanPath(paths, fullPath)
45 var path = env.GetModulesDir()
46
47 matches, _ := ioutil.ReadDir(path)
48
49 for _, value := range matches {
50
51 var packagePath = filepath.Join(path, value.Name(), consts.FilePackage)
52 if _, err := os.Stat(packagePath); !os.IsNotExist(err) {
53
54 other, _ := models.LoadPackageOther(packagePath)
55 paths = getNewPathsFromDir(filepath.Join(path, value.Name(), other.MainSrc), paths, fullPath, rootPath)
56
57 } else {
58 paths = getNewPathsFromDir(filepath.Join(path, value.Name()), paths, fullPath, rootPath)
59 }
60 }
61 return paths
62}
63
64func getDefaultPath(fullPath bool, rootPath string) []string {
65 var paths []string

Callers 3

processCompilerOptionsFunction · 0.85
processCurrentPathFunction · 0.85
updateGlobalLibraryPathFunction · 0.85

Calls 4

GetModulesDirFunction · 0.92
LoadPackageOtherFunction · 0.92
cleanPathFunction · 0.85
getNewPathsFromDirFunction · 0.85

Tested by

no test coverage detected