mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 00:46:38 +01:00
Add the Ocaml ecosystem (#3112)
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
+7
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user