mirror of
https://github.com/anchore/syft.git
synced 2026-11-04 08:26:38 +01:00
add python wheel and egg analyzer support
This commit is contained in:
@@ -13,7 +13,7 @@ type Analyzer struct {
|
||||
|
||||
func NewAnalyzer() *Analyzer {
|
||||
pathParserDispatch := map[string]common.ParserFn{
|
||||
"/var/lib/dpkg/status": ParseDpkgStatus,
|
||||
"/var/lib/dpkg/status": parseDpkgStatus,
|
||||
}
|
||||
|
||||
return &Analyzer{
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
var errEndOfPackages = fmt.Errorf("no more packages to read")
|
||||
|
||||
func ParseDpkgStatus(reader io.Reader) ([]pkg.Package, error) {
|
||||
func parseDpkgStatus(reader io.Reader) ([]pkg.Package, error) {
|
||||
buffedReader := bufio.NewReader(reader)
|
||||
var packages = make([]pkg.Package, 0)
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ func TestMultiplePackages(t *testing.T) {
|
||||
}
|
||||
}()
|
||||
|
||||
pkgs, err := ParseDpkgStatus(file)
|
||||
pkgs, err := parseDpkgStatus(file)
|
||||
if err != nil {
|
||||
t.Fatal("Unable to read file contents: ", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user