mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
fix: use generic instead of not generating purl (#1119)
This commit is contained in:
parent
b720a3c81c
commit
8235e8e581
@ -41,9 +41,7 @@ func URL(p Package, release *linux.Release) string {
|
|||||||
|
|
||||||
switch {
|
switch {
|
||||||
case purlType == "":
|
case purlType == "":
|
||||||
// there is no purl type, don't attempt to craft a purl
|
purlType = packageurl.TypeGeneric
|
||||||
// TODO: should this be a "generic" purl type instead?
|
|
||||||
return ""
|
|
||||||
case p.Type == GoModulePkg:
|
case p.Type == GoModulePkg:
|
||||||
re := regexp.MustCompile(`(/)[^/]*$`)
|
re := regexp.MustCompile(`(/)[^/]*$`)
|
||||||
fields := re.Split(p.Name, -1)
|
fields := re.Split(p.Name, -1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user