mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 06:56:40 +01:00
Add pacman (alpm) parser support (#943)
Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
co-authored by
Christopher Phillips
parent
f15d4a9984
commit
e72d68b0c6
@@ -9,6 +9,8 @@ import (
|
||||
func SourceInfo(p pkg.Package) string {
|
||||
answer := ""
|
||||
switch p.Type {
|
||||
case pkg.AlpmPkg:
|
||||
answer = "acquired package info from ALPM DB"
|
||||
case pkg.RpmPkg:
|
||||
answer = "acquired package info from RPM DB"
|
||||
case pkg.ApkPkg:
|
||||
|
||||
@@ -142,6 +142,14 @@ func Test_SourceInfo(t *testing.T) {
|
||||
"from dotnet project assets file",
|
||||
},
|
||||
},
|
||||
{
|
||||
input: pkg.Package{
|
||||
Type: pkg.AlpmPkg,
|
||||
},
|
||||
expected: []string{
|
||||
"from ALPM DB",
|
||||
},
|
||||
},
|
||||
}
|
||||
var pkgTypes []pkg.Type
|
||||
for _, test := range tests {
|
||||
|
||||
Reference in New Issue
Block a user