From 4b280bdcd2fa524487830e5e7ed825ac40e57947 Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Sat, 1 May 2021 16:53:56 -0400 Subject: [PATCH] export loglist.Unmarshal --- loglist/load.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/loglist/load.go b/loglist/load.go index c3e7ef2..8fd5c4d 100644 --- a/loglist/load.go +++ b/loglist/load.go @@ -38,7 +38,7 @@ func Fetch(url string) (*List, error) { if response.StatusCode != 200 { return nil, fmt.Errorf("%s: %s", url, response.Status) } - return unmarshal(content) + return Unmarshal(content) } func ReadFile(filename string) (*List, error) { @@ -46,10 +46,10 @@ func ReadFile(filename string) (*List, error) { if err != nil { return nil, err } - return unmarshal(content) + return Unmarshal(content) } -func unmarshal(jsonBytes []byte) (*List, error) { +func Unmarshal(jsonBytes []byte) (*List, error) { list := new(List) if err := json.Unmarshal(jsonBytes, list); err != nil { return nil, err