feat: Allow specific versions of formats to be specified (#1543)

This commit is contained in:
Keith Zantow
2023-02-07 10:40:43 -05:00
committed by GitHub
parent 95201840d2
commit 9650473298
26 changed files with 349 additions and 187 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import (
"github.com/anchore/syft/cmd/syft/cli/options"
"github.com/anchore/syft/internal/config"
"github.com/anchore/syft/internal/log"
"github.com/anchore/syft/syft"
"github.com/anchore/syft/syft/formats"
)
func Run(_ context.Context, app *config.Application, args []string) error {
@@ -34,7 +34,7 @@ func Run(_ context.Context, app *config.Application, args []string) error {
_ = f.Close()
}()
sbom, _, err := syft.Decode(f)
sbom, _, err := formats.Decode(f)
if err != nil {
return fmt.Errorf("failed to decode SBOM: %w", err)
}