From 88c7bfa6f97b37edeca3103bf7b74d94d2c75369 Mon Sep 17 00:00:00 2001 From: crozzy Date: Fri, 2 Feb 2024 13:22:04 -0800 Subject: [PATCH] toolkit: add CSAF type and helper methods Adding the ability to reason with CSAF data and some methods to trawl through the objects. Signed-off-by: crozzy --- toolkit/types/csaf/csaf_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/toolkit/types/csaf/csaf_test.go b/toolkit/types/csaf/csaf_test.go index ae7dfb124..b16f3c3b2 100644 --- a/toolkit/types/csaf/csaf_test.go +++ b/toolkit/types/csaf/csaf_test.go @@ -9,14 +9,22 @@ import ( func TestParse(t *testing.T) { f, err := os.Open("testdata/cve-2021-0084.json") if err != nil { +<<<<<<< HEAD t.Fatalf("failed to open test data: %v", err) +======= + t.Fatalf("failed to open test data: %v %v", path, err) +>>>>>>> a8136c5e (toolkit: add CSAF type and helper methods) } defer f.Close() b, err := io.ReadAll(f) if err != nil { t.Fatalf("got an error reading file bytes: %v", err) } +<<<<<<< HEAD _, err = Parse(b) +======= + _, err = ParseCSAF(b) +>>>>>>> a8136c5e (toolkit: add CSAF type and helper methods) if err != nil { t.Fatalf("failed to parse CSAF JSON: %v", err) }