summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2018-04-23 09:39:04 +0100
committerNick White <git@njw.name>2018-04-23 09:39:04 +0100
commit79caca3370da877dfd1eae977c5a32837a373f17 (patch)
tree2fbe38fdc8e0dcd3f3c0577dfe35e90e0ee53314
parentd2613b543db5c2d9c1f48d79d47bfcf7c1388f92 (diff)
downloadweather-79caca3370da877dfd1eae977c5a32837a373f17.tar.bz2
weather-79caca3370da877dfd1eae977c5a32837a373f17.zip
Add some more weather descriptions to the mapping
-rw-r--r--weather.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weather.go b/weather.go
index 25142cd..741fd9d 100644
--- a/weather.go
+++ b/weather.go
@@ -107,6 +107,8 @@ var TypeDescription = map[int]string{
2: "Partly Cloudy",
3: "Sunny Intervals",
7: "Light Cloud",
+ 8: "Thick Cloud",
+ 9: "Light Rain Showers",
12: "Light Rain",
}
@@ -227,7 +229,7 @@ func main() {
for _, w := range weather {
fmt.Printf("%s %s ", w.date, w.time)
- fmt.Printf("%15s, Temp: %4.1f°C, ", TypeDescription[w.weathertype], w.temperature)
+ fmt.Printf("%18s, Temp: %4.1f°C, ", TypeDescription[w.weathertype], w.temperature)
fmt.Printf("Rain: %2d%%, Wind: %4.1fmph\n", w.precipitation, w.windspeed)
if *verbose {
fmt.Printf(" %+v\n", w)