Handle json decoding errors

This commit is contained in:
Hamcha 2018-09-17 14:02:10 +02:00
parent 54c6e88ae5
commit 3b5f8a0934
Signed by: hamcha
GPG key ID: A40413D21021EAEE

View file

@ -60,6 +60,6 @@ func scryfallSearch(query string) (results CardSearchResults, err error) {
} }
defer response.Body.Close() defer response.Body.Close()
json.NewDecoder(response.Body).Decode(&results) err = json.NewDecoder(response.Body).Decode(&results)
return return
} }