From 19dd6110004531c088236aeac2094a14c61f03a9 Mon Sep 17 00:00:00 2001 From: Inanc Gumus Date: Fri, 6 Sep 2019 00:30:18 +0300 Subject: [PATCH] fix: err return in decode to iface --- interfaces/11-decode-toiface/database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/11-decode-toiface/database.go b/interfaces/11-decode-toiface/database.go index 5b634c4..fa99041 100644 --- a/interfaces/11-decode-toiface/database.go +++ b/interfaces/11-decode-toiface/database.go @@ -29,7 +29,7 @@ func (db *database) UnmarshalJSON(data []byte) error { // First, decode the "Type" part. // Leave the "Item" as raw json data. if err := json.Unmarshal(data, &decodables); err != nil { - log.Fatalln(err) + return err } // Decode the "Item" part for each json object.