Add alpine type to purl (#1431)

Signed-off-by: Benji Visser <benji@093b.org>
This commit is contained in:
Benji Visser
2023-01-04 17:35:46 -05:00
committed by GitHub
parent bc1edb9c8a
commit bb6fc6525c
14 changed files with 67 additions and 67 deletions
+5 -3
View File
@@ -1,6 +1,8 @@
package pkg
import "github.com/anchore/packageurl-go"
import (
"github.com/anchore/packageurl-go"
)
// Type represents a Package Type for or within a language ecosystem (there may be multiple package types within a language ecosystem)
type Type string
@@ -58,7 +60,7 @@ var AllPkgs = []Type{
func (t Type) PackageURLType() string {
switch t {
case ApkPkg:
return "alpine"
return packageurl.TypeAlpine
case AlpmPkg:
return "alpm"
case GemPkg:
@@ -114,7 +116,7 @@ func TypeByName(name string) Type {
return RpmPkg
case "alpm":
return AlpmPkg
case "alpine":
case packageurl.TypeAlpine, "alpine":
return ApkPkg
case packageurl.TypeMaven:
return JavaPkg