mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
* Add draft of covid module * Work on pointers * Add country stats * Remove recovered, stays at 0 * Handle response code * One struct for both * List of countries * Add test * Add test for countries * Fix typos * Format numbers based on language/locale
15 lines
383 B
Go
15 lines
383 B
Go
package covid
|
|
|
|
// Cases holds the latest cases
|
|
type Cases struct {
|
|
Latest Latest `json:"latest"`
|
|
}
|
|
|
|
// Latest holds the number of global confirmed cases and deaths due to Covid
|
|
type Latest struct {
|
|
Confirmed int `json:"confirmed"`
|
|
Deaths int `json:"deaths"`
|
|
// Not currently used but holds information about the country
|
|
Locations []interface{} `json:"locations,omitempty"`
|
|
}
|