summaryrefslogtreecommitdiff
path: root/example/main.go
diff options
context:
space:
mode:
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)
}