Add dart support (#919)

Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Eric Larssen
2022-03-31 15:44:55 -04:00
committed by GitHub
co-authored by Alex Goodman
parent f157d7a862
commit cb3e73e308
25 changed files with 1690 additions and 10 deletions
+4
View File
@@ -19,6 +19,7 @@ const (
Ruby Language = "ruby"
Go Language = "go"
Rust Language = "rust"
Dart Language = "dart"
)
// AllLanguages is a set of all programming languages detected by syft.
@@ -30,6 +31,7 @@ var AllLanguages = []Language{
Ruby,
Go,
Rust,
Dart,
}
// String returns the string representation of the language.
@@ -62,6 +64,8 @@ func LanguageByName(name string) Language {
return Ruby
case purlCargoPkgType:
return Rust
case packageurl.TypePub, string(Dart):
return Dart
default:
return UnknownLanguage
}