This program is structured on three parts:
- Fetching cities (gountries)
- Computing their weather with coordinates (openweathermap)
- Saving the data into an excel file (excelize)
Don't forget to add dependencies:
go get github.com/pariz/gountries
go get github.com/briandowns/openweathermap
go get github.com/360EntSecGroup-Skylar/excelize
Optional(for wiki_parser.go):
go get github.com/PuerkitoBio/goquery
You can run the program by typing this command:
go run main.go
I also wrote an article explaining the program. You can find it here: https://medium.com/ensias-it/tracking-the-weather-in-major-moroccan-cities-with-go-4907ffdc9c34