global-countries-gosdk
A Golang implementation of global-countries
Installation
go get github.com/GoodnessEzeokafor/global-countries-go
data:= countries.Countries()
fmt.Println(data)
country := "iraq"
capital, err := countries.GetCountryCallCode(country)
if err != nil {
fmt.Println(err)
}
fmt.Println(capital)
country := "iraq"
capital, err := countries.GetCountryFlag(country)
if err != nil {
fmt.Println(err)
}
fmt.Println(capital)
country := "zambia"
capital, err := countries.GetCountryIsoCodes(country)
if err != nil {
fmt.Println(err)
}
fmt.Println(capital)
country := "nigeria"
capital, err := countries.GetCountryCapital(country)
if err != nil {
fmt.Println(err)
}
fmt.Println(capital)