MCPcopy Index your code
hub / github.com/XmirrorSecurity/OpenSCA-cli / Path

Function Path

opensca/sca/cache/cache.go:46–60  ·  view source on GitHub ↗
(vendor, name, version string, language model.Language)

Source from the content-addressed store, hash-verified

44}
45
46func Path(vendor, name, version string, language model.Language) string {
47 cacheOnce.Do(initCache)
48 var path string
49 switch language {
50 case model.Lan_Java:
51 path = filepath.Join(cacheDir, "maven", vendor, name, version, fmt.Sprintf("%s-%s.pom", name, version))
52 case model.Lan_JavaScript:
53 path = filepath.Join(cacheDir, "npm", fmt.Sprintf("%s.json", name))
54 case model.Lan_Php:
55 path = filepath.Join(cacheDir, "composer", fmt.Sprintf("%s.json", name))
56 default:
57 path = filepath.Join(cacheDir, "none", fmt.Sprintf("%s-%s-%s", vendor, name, version))
58 }
59 return path
60}

Callers 3

composer.goFile · 0.92
npm.goFile · 0.92
mvn.goFile · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected