Skip to content

Commit

Permalink
check if error on unmarshal
Browse files Browse the repository at this point in the history
  • Loading branch information
uelei committed Mar 24, 2022
1 parent 6c6730e commit b01e436
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ func MakeRangeRequest(startDate time.Time, endDate time.Time) []lib.DayValues {

var result lib.RangeResponse

err := json.Unmarshal(resp, &result)

lib.Check(err)
if err := json.Unmarshal(resp, &result); err != nil {
panic(err)
}

log.Printf("Found %d records of price..\n", len(result.Value))

Expand Down

0 comments on commit b01e436

Please sign in to comment.