fix: use generic instead of not generating purl (#1119)

This commit is contained in:
cpendery
2022-07-27 09:06:37 -04:00
committed by GitHub
parent b720a3c81c
commit 8235e8e581
+1 -3
View File
@@ -41,9 +41,7 @@ func URL(p Package, release *linux.Release) string {
switch {
case purlType == "":
// there is no purl type, don't attempt to craft a purl
// TODO: should this be a "generic" purl type instead?
return ""
purlType = packageurl.TypeGeneric
case p.Type == GoModulePkg:
re := regexp.MustCompile(`(/)[^/]*$`)
fields := re.Split(p.Name, -1)