mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 00:46:38 +01:00
feat: implement haskell support (#1096)
This commit is contained in:
@@ -26,6 +26,7 @@ const (
|
||||
CocoapodsPkg Type = "pod"
|
||||
ConanPkg Type = "conan"
|
||||
PortagePkg Type = "portage"
|
||||
HackagePkg Type = "hackage"
|
||||
)
|
||||
|
||||
// AllPkgs represents all supported package types
|
||||
@@ -48,6 +49,7 @@ var AllPkgs = []Type{
|
||||
CocoapodsPkg,
|
||||
ConanPkg,
|
||||
PortagePkg,
|
||||
HackagePkg,
|
||||
}
|
||||
|
||||
// PackageURLType returns the PURL package type for the current package.
|
||||
@@ -85,6 +87,8 @@ func (t Type) PackageURLType() string {
|
||||
return packageurl.TypeConan
|
||||
case PortagePkg:
|
||||
return "portage"
|
||||
case HackagePkg:
|
||||
return packageurl.TypeHackage
|
||||
default:
|
||||
// TODO: should this be a "generic" purl type instead?
|
||||
return ""
|
||||
@@ -132,6 +136,8 @@ func TypeByName(name string) Type {
|
||||
return CocoapodsPkg
|
||||
case packageurl.TypeConan:
|
||||
return ConanPkg
|
||||
case packageurl.TypeHackage:
|
||||
return HackagePkg
|
||||
case "portage":
|
||||
return PortagePkg
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user