MCPcopy Create free account
hub / github.com/posener/complete / predictLocalAndSystem

Function predictLocalAndSystem

gocomplete/pkgs.go:33–41  ·  view source on GitHub ↗
(prefix string)

Source from the content-addressed store, hash-verified

31}
32
33func predictLocalAndSystem(prefix string) []string {
34 localDirs := predict.FilesSet(listPackages(directory(prefix))).Predict(prefix)
35 // System directories are not actual file names, for example: 'github.com/posener/complete' could
36 // be the argument, but the actual filename is in $GOPATH/src/github.com/posener/complete'. this
37 // is the reason to use the PredictSet and not the PredictDirs in this case.
38 s := systemDirs(prefix)
39 sysDirs := predict.Set(s).Predict(prefix)
40 return append(localDirs, sysDirs...)
41}
42
43// listPackages looks in current pointed dir and in all it's direct sub-packages
44// and return a list of paths to go packages.

Callers 1

predictPackagesFunction · 0.85

Calls 6

FilesSetTypeAlias · 0.92
SetTypeAlias · 0.92
listPackagesFunction · 0.85
systemDirsFunction · 0.85
directoryFunction · 0.70
PredictMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…