1948-filter-pkg-by-type (#2011)

---------

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
Christopher Angelo Phillips
2023-08-09 16:05:52 -04:00
committed by GitHub
parent 6bf6f85584
commit 541c8d339b
13 changed files with 39 additions and 45 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import (
"github.com/anchore/syft/syft/pkg"
)
const CatalogerName = "binary-cataloger"
const catalogerName = "binary-cataloger"
func NewCataloger() *Cataloger {
return &Cataloger{}
@@ -22,7 +22,7 @@ type Cataloger struct{}
// Name returns a string that uniquely describes the Cataloger
func (c Cataloger) Name() string {
return CatalogerName
return catalogerName
}
// Catalog is given an object to resolve file references and content, this function returns any discovered Packages
+1 -1
View File
@@ -31,7 +31,7 @@ func newPackage(classifier classifier, location file.Location, matchMetadata map
),
Type: pkg.BinaryPkg,
CPEs: cpes,
FoundBy: CatalogerName,
FoundBy: catalogerName,
MetadataType: pkg.BinaryMetadataType,
Metadata: pkg.BinaryMetadata{
Matches: []pkg.ClassifierMatch{