summaryrefslogtreecommitdiffstats
path: root/nws
diff options
context:
space:
mode:
Diffstat (limited to 'nws')
-rw-r--r--nws/nws.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/nws/nws.go b/nws/nws.go
index 0c6d6e0..a3155ab 100644
--- a/nws/nws.go
+++ b/nws/nws.go
@@ -46,7 +46,7 @@ func Points(lat, lng float32) (*NWSPoint, error) {
// Parse response body.
body, err := io.ReadAll(resp.Body)
if err != nil {
- return nil, fmt.Errorf("getting points: body: %v", err)
+ return nil, fmt.Errorf("points: body: %v", err)
}
// Check if the request failed.
@@ -63,13 +63,13 @@ func Points(lat, lng float32) (*NWSPoint, error) {
point := new(NWSPoint)
err = json.Unmarshal(body, point)
if err != nil {
- return nil, fmt.Errorf("points: json decode: %v", err)
+ return nil, fmt.Errorf("points: decode: %v", err)
}
if point.Properties.Forecast == "" {
- return nil, fmt.Errorf("points: json: forecast empty")
+ return nil, fmt.Errorf("points: forecast empty")
}
if point.Properties.ForecastHourly == "" {
- return nil, fmt.Errorf("points: json: forecasthourly empty")
+ return nil, fmt.Errorf("points: forecasthourly empty")
}
return point, nil
}