From 8466c1b6ee64001a1c27b881df18ea6f530a0a25 Mon Sep 17 00:00:00 2001 From: Christopher Angelo Phillips <32073428+spiffcs@users.noreply.github.com> Date: Fri, 30 Sep 2022 11:57:13 -0400 Subject: [PATCH] update requires to use list; remove field (#1234) Signed-off-by: Christopher Phillips --- syft/pkg/cataloger/cpp/parse_conanlock.go | 17 ++++++++--------- syft/pkg/cataloger/cpp/test-fixtures/conan.lock | 1 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/syft/pkg/cataloger/cpp/parse_conanlock.go b/syft/pkg/cataloger/cpp/parse_conanlock.go index 85fcf1c035f..b49bf5f113a 100644 --- a/syft/pkg/cataloger/cpp/parse_conanlock.go +++ b/syft/pkg/cataloger/cpp/parse_conanlock.go @@ -16,15 +16,14 @@ var _ common.ParserFn = parseConanlock type conanLock struct { GraphLock struct { Nodes map[string]struct { - Ref string `json:"ref"` - PackageID string `json:"package_id"` - Context string `json:"context"` - Prev string `json:"prev"` - Requires string `json:"requires"` - BuildRequires string `json:"build_requires"` - PythonRequires string `json:"py_requires"` - Options string `json:"options"` - Path string `json:"path"` + Ref string `json:"ref"` + PackageID string `json:"package_id"` + Context string `json:"context"` + Prev string `json:"prev"` + Requires []string `json:"requires"` + PythonRequires string `json:"py_requires"` + Options string `json:"options"` + Path string `json:"path"` } `json:"nodes"` } `json:"graph_lock"` Version string `json:"version"` diff --git a/syft/pkg/cataloger/cpp/test-fixtures/conan.lock b/syft/pkg/cataloger/cpp/test-fixtures/conan.lock index b63008d90bb..cbae840d949 100644 --- a/syft/pkg/cataloger/cpp/test-fixtures/conan.lock +++ b/syft/pkg/cataloger/cpp/test-fixtures/conan.lock @@ -4,6 +4,7 @@ "0": { "ref": "zlib/1.2.12", "options": "fPIC=True\nshared=False", + "requires": [], "path": "all/conanfile.py", "context": "host" }