Allow for cataloging a single file (#608)

* allow for cataloging a single file

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* use all catalogers for file schemes

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman
2021-11-02 12:09:06 -04:00
committed by GitHub
parent a2882ee810
commit 3ac95ac4f6
8 changed files with 199 additions and 54 deletions
+3
View File
@@ -52,6 +52,9 @@ func CatalogPackages(src *source.Source, scope source.Scope) (*pkg.Catalog, *dis
case source.ImageScheme:
log.Info("cataloging image")
catalogers = cataloger.ImageCatalogers()
case source.FileScheme:
log.Info("cataloging file")
catalogers = cataloger.AllCatalogers()
case source.DirectoryScheme:
log.Info("cataloging directory")
catalogers = cataloger.DirectoryCatalogers()