From eda8782d8b2c7c8bde8c096625816a98b0c98057 Mon Sep 17 00:00:00 2001 From: Prasad Ghangal Date: Mon, 3 May 2021 13:22:22 +0530 Subject: [PATCH] Fix data type for AvailableCapacity (#2) Signed-off-by: Prasad Ghangal --- search.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/search.go b/search.go index 6acd821..ad7b878 100644 --- a/search.go +++ b/search.go @@ -66,7 +66,7 @@ type Appointments struct { Sessions []struct { SessionID string `json:"session_id"` Date string `json:"date"` - AvailableCapacity int `json:"available_capacity"` + AvailableCapacity float64 `json:"available_capacity"` MinAgeLimit int `json:"min_age_limit"` Vaccine string `json:"vaccine"` Slots []string `json:"slots"` @@ -200,7 +200,7 @@ func getAvailableSessions(response []byte, age int) error { return err } if buf.Len() == 0 { - log.Print("No slots available, rechecking") + log.Print("No slots available, rechecking after 3 mins") return nil } log.Print("Found available slots, sending email")