From 6d32931fa6bf7a357dc5081751e0b2240ce50d80 Mon Sep 17 00:00:00 2001 From: K Date: Tue, 2 Mar 2021 16:49:34 -0800 Subject: [PATCH] Export readBytes as FromBytes --- sarif/sarif.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sarif/sarif.go b/sarif/sarif.go index 9087a64..7efc87d 100644 --- a/sarif/sarif.go +++ b/sarif/sarif.go @@ -49,15 +49,15 @@ func Open(filename string) (*Report, error) { if err != nil { return nil, fmt.Errorf("the provided filepath could not be opened. %w", err) } - return readBytes(content) + return FromBytes(content) } func FromString(content string) (*Report, error) { - return readBytes([]byte(content)) + return FromBytes([]byte(content)) } -func readBytes(content []byte) (*Report, error) { +func FromBytes(content []byte) (*Report, error) { var report Report if err := json.Unmarshal(content, &report); err != nil{ return nil, err