feat: implement haskell support (#1096)

This commit is contained in:
cpendery
2022-07-18 15:33:54 -04:00
committed by GitHub
parent 00e12329d0
commit 9b1adce19a
27 changed files with 985 additions and 0 deletions
+6
View File
@@ -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: