mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 23:16:30 +01:00
improve config parsing + fix command deprecation warning
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
@@ -23,6 +23,9 @@ type JSONPackage struct {
|
||||
|
||||
func NewJSONPackages(catalog *pkg.Catalog) ([]JSONPackage, error) {
|
||||
artifacts := make([]JSONPackage, 0)
|
||||
if catalog == nil {
|
||||
return artifacts, nil
|
||||
}
|
||||
for _, p := range catalog.Sorted() {
|
||||
art, err := NewJSONPackage(p)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user