mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 07:26:34 +01:00
feat: add initial dotnet-support (#951)
* feat: add initial dotnet-support Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * fix: add path, sha512 and hashpath Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * fix: add missing dot Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * fix: lint warnings Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * fix CLI test package counts to account for dotnet Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * fix: updated packagurl-go Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * tidy go.sum Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * update json schema Signed-off-by: Alex Goodman <alex.goodman@anchore.com> Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
co-authored by
Alex Goodman
parent
d2f053bc71
commit
1cea0ecd5c
@@ -20,6 +20,7 @@ const (
|
||||
Go Language = "go"
|
||||
Rust Language = "rust"
|
||||
Dart Language = "dart"
|
||||
Dotnet Language = "dotnet"
|
||||
)
|
||||
|
||||
// AllLanguages is a set of all programming languages detected by syft.
|
||||
@@ -32,6 +33,7 @@ var AllLanguages = []Language{
|
||||
Go,
|
||||
Rust,
|
||||
Dart,
|
||||
Dotnet,
|
||||
}
|
||||
|
||||
// String returns the string representation of the language.
|
||||
@@ -66,6 +68,8 @@ func LanguageByName(name string) Language {
|
||||
return Rust
|
||||
case packageurl.TypePub, string(Dart):
|
||||
return Dart
|
||||
case packageurl.TypeDotnet:
|
||||
return Dotnet
|
||||
default:
|
||||
return UnknownLanguage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user