A simple Go library which lets you get information on Covid-19
package main
import (
"github.com/YeffyCodeGit/Govid/govid"
"fmt"
)
func main() {
data, err := govid.GetGlobalData()
if err != nil {
panic(err)
}
fmt.Printf("%+v", data)
}
package main
import (
"github.com/YeffyCodeGit/Govid/govid"
"fmt"
)
func main() {
data, err := govid.GetCountryData("Bangladesh")
if err != nil {
panic(err)
}
fmt.Printf("%+v", data)
}
package main
import (
"github.com/YeffyCodeGit/Govid/govid"
"fmt"
)
func main() {
data, err := govid.GetAllCountriesData()
if err != nil {
panic(err)
}
fmt.Printf("%+v", data)
}
package main
import (
"github.com/YeffyCodeGit/Govid/govid"
"fmt"
)
func main() {
data, err := govid.GetCountryDataByLimit(2)
if err != nil { panic(err) }
fmt.Printf("%+v", data)
}
go get github.com/YeffyCodeGit/Govid
First, clone the repo:
git clone https://github.com/YeffyCodeGit/Govid
Run the unit tests:
go test ./govid/tests
Thanks to https://github.com/WaifuShork for helping me on this project This project uses the Covid-19 API by Javier Aviles. You can find it here: https://github.com/javieraviles/covidAPI