diff options
author | siddharth ravikumar <s@ricketyspace.net> | 2022-05-29 11:51:47 -0400 |
---|---|---|
committer | siddharth ravikumar <s@ricketyspace.net> | 2022-05-29 11:51:47 -0400 |
commit | 7bcf80febb53f2e28c9f54fd4aa9cc0c690f5926 (patch) | |
tree | cd62335957de7514809ef90db4299a42c39c0e5b /main.go | |
parent | 797643641183718e49f4f2e4006f598d745bc5ce (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.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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), |