summaryrefslogtreecommitdiff
path: root/example/main.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-09-21 17:47:00 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-09-21 17:47:00 +0200
commit663df0e2908b0b328ed35591338e18fae482f955 (patch)
tree2885e8f56439ec62e2f85716f0439358a3b7ddba /example/main.go
parent911a6625e27e8bf56ed1afb1c50a88a5f9bb65e3 (diff)
Fix some float/int bugs and error reporting
Diffstat (limited to 'example/main.go')
-rw-r--r--example/main.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/example/main.go b/example/main.go
index 3eddcc8..e8c03c7 100644
--- a/example/main.go
+++ b/example/main.go
@@ -8,9 +8,11 @@ import (
)
func main() {
- current, err := weather.ByCityName("Berlin")
- if err != nil {
- log.Fatal(err)
+ for _, loc := range []string{"Berlin", "London", ""} {
+ current, err := weather.ByCityName(loc)
+ if err != nil {
+ log.Fatal(err)
+ }
+ fmt.Println(current)
}
- fmt.Println(current)
}