Add the Ocaml ecosystem (#3112)

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
Laurent Goderre
2024-09-10 10:35:18 -04:00
committed by GitHub
parent dafc6ad034
commit 9c2799e379
30 changed files with 3454 additions and 3 deletions
+7 -1
View File
@@ -43,6 +43,7 @@ const (
RustPkg Type = "rust-crate"
SwiftPkg Type = "swift"
SwiplPackPkg Type = "swiplpack"
OpamPkg Type = "opam"
WordpressPluginPkg Type = "wordpress-plugin"
)
@@ -80,12 +81,13 @@ var AllPkgs = []Type{
RustPkg,
SwiftPkg,
SwiplPackPkg,
OpamPkg,
WordpressPluginPkg,
}
// PackageURLType returns the PURL package type for the current package.
//
//nolint:funlen
//nolint:funlen, gocyclo
func (t Type) PackageURLType() string {
switch t {
case AlpmPkg:
@@ -145,6 +147,8 @@ func (t Type) PackageURLType() string {
return packageurl.TypeSwift
case SwiplPackPkg:
return "swiplpack"
case OpamPkg:
return "opam"
case WordpressPluginPkg:
return "wordpress-plugin"
default:
@@ -223,6 +227,8 @@ func TypeByName(name string) Type {
return SwiftPkg
case "swiplpack":
return SwiplPackPkg
case "opam":
return OpamPkg
case "wordpress-plugin":
return WordpressPluginPkg
default: