Skip to content

Commit

Permalink
toolkit: add CSAF type and helper methods
Browse files Browse the repository at this point in the history
Adding the ability to reason with CSAF data and some methods
to trawl through the objects.

Signed-off-by: crozzy <[email protected]>
  • Loading branch information
crozzy committed Feb 2, 2024
1 parent ee2c880 commit 88c7bfa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions toolkit/types/csaf/csaf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 88c7bfa

Please sign in to comment.