diff options
-rw-r--r-- | weather.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -237,8 +237,8 @@ func main() { for _, w := range weather { fmt.Printf("%s %s ", w.date, w.time) - desc := TypeDescription[w.weathertype] - if desc == "" { + desc, ok := TypeDescription[w.weathertype] + if !ok { desc = fmt.Sprintf("%d", w.weathertype) } fmt.Printf("%18s, Temp: %4.1f°C, ", desc, w.temperature) |