summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorsiddharth ravikumar <s@ricketyspace.net>2022-05-29 11:51:47 -0400
committersiddharth ravikumar <s@ricketyspace.net>2022-05-29 11:51:47 -0400
commit7bcf80febb53f2e28c9f54fd4aa9cc0c690f5926 (patch)
treecd62335957de7514809ef90db4299a42c39c0e5b /main.go
parent797643641183718e49f4f2e4006f598d745bc5ce (diff)
nws: remove "NWS" from types
Also rename: - `Forecast` function to `GetForecast`. - `ForecastHourly` function to `GetForecastHourly`.
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index 503938a..c19e133 100644
--- a/main.go
+++ b/main.go
@@ -119,12 +119,12 @@ func showWeather(w http.ResponseWriter, lat, lng float32) {
}
// get forecast
- f, err := nws.Forecast(point)
+ f, err := nws.GetForecast(point)
if err != nil {
http.Error(w, err.Error(), 500)
return
}
- fh, err := nws.ForecastHourly(point)
+ fh, err := nws.GetForecastHourly(point)
if err != nil {
http.Error(w, err.Error(), 500)
return
@@ -164,7 +164,7 @@ func showSearch(w http.ResponseWriter, r *http.Request) {
}
}
-func NewWeather(point *nws.NWSPoint, f, fh *nws.NWSForecast) (*Weather, error) {
+func NewWeather(point *nws.Point, f, fh *nws.Forecast) (*Weather, error) {
w := new(Weather)
w.Location = fmt.Sprintf("%s, %s",
strings.ToLower(point.Properties.RelativeLocation.Properties.City),