개발/go 4

[golang] Covid19 정보 조회

Covid19 1년넘게 지겹게 우릴를 괴롭히고 있는는 #Covid19에 대한 정보를 얻을 수 있는 공개된 API는 이미 많이 있다.. 구글검색 조금만 하면 쉽게 찾을 수 있다. 이번엔 API를 이용해서 우리나라의 코로나19 감염발생자수를 조회해 보자 package main import ( "encoding/json" "fmt" "io/ioutil" "net/http" ) type Country struct { Country string CountryCode string Province string City string CityCode string Lat string Lon string Cases int Status string Date string } func main() { url := "https:/..

개발/go 2021.01.27