summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsiddharth ravikumar <s@ricketyspace.net>2022-06-07 01:06:09 -0400
committersiddharth ravikumar <s@ricketyspace.net>2022-06-07 01:06:09 -0400
commit8252cfe094ef0664631ea1d3f51a2b5f8b69ea86 (patch)
tree52ec5554a16480846aa5359a7f00a4a3ebcf5ed0
parent55fc4b89102c9c19dc8d0ee59bc92ea58ce287c8 (diff)
photon: update `Geocode`
Cache weather for each matching location.
-rw-r--r--photon/photon.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/photon/photon.go b/photon/photon.go
index 44b4b92..8c85a09 100644
--- a/photon/photon.go
+++ b/photon/photon.go
@@ -13,6 +13,7 @@ import (
"strings"
"ricketyspace.net/peach/client"
+ "ricketyspace.net/peach/nws"
)
// Coordinates.
@@ -129,6 +130,7 @@ func Geocode(location string) ([]Coordinates, error) {
names[c.Name] = true
mCoords = append(mCoords, c)
+ go nws.CacheWeather(c.Lat, c.Lng)
}
return mCoords, nil
}