Simple command line weather client using OpenWeather API and Google Maps Geocoding.
-
Define
OpenWeatherApiKey
inconstants.go
-
Define
GoogleApiKey
inconstants.go
-
Enable Google Maps Geocoding API in your Maps API console.
-
go install go-weather
-
Ensure your Go bin directory is in your
PATH
, example.bash_profile
line:export PATH=$PATH:$HOME/go/bin
Usage: go-weather [ -period=current|hourly|daily ] [ -units=C|F ] <location>...
-period string
current | hourly | daily (default "current")
-units string
C | F (default "C")
$ go-weather -period=daily -units=f 80209 80919
Weather for 80209:
Current: 63.37F | Humidity: 36% | few clouds
Weather for 80919:
Current: 58.48F | Humidity: 33% | clear sky