fix: err return in decode to iface

This commit is contained in:
Inanc Gumus
2019-09-06 00:30:18 +03:00
committed by GitHub
parent efae6414db
commit 19dd611000

View File

@ -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.