diff options
author | siddharth <s@ricketyspace.net> | 2022-05-15 23:17:46 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2022-05-15 23:17:46 -0400 |
commit | 7b13bb91cd786277fdc67a0917cfa0dbd3776df0 (patch) | |
tree | 21f8c7f326e199c92457b24b2629aef8933b0da7 /nws/nws.go | |
parent | cb8506da1b23d50796bf14a16ffe44781bf36e32 (diff) |
nws: update NWSPointProperties
ForecastLink -> Forecast
ForecastHourlLink -> ForecastHourly
Diffstat (limited to 'nws/nws.go')
-rw-r--r-- | nws/nws.go | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -13,11 +13,11 @@ import ( ) type NWSPointProperties struct { - GridId string - GridX int - GridY int - ForecastLink string `json:"forecast"` - ForecastHourlyLink string `json:"forecastHourly"` + GridId string + GridX int + GridY int + Forecast string + ForecastHourly string } type NWSPoint struct { @@ -65,11 +65,11 @@ func Points(lat, lng float32) (*NWSPoint, error) { if err != nil { return nil, fmt.Errorf("points: json decode: %v", err) } - if point.Properties.ForecastLink == "" { - return nil, fmt.Errorf("points: json: %v", err) + if point.Properties.Forecast == "" { + return nil, fmt.Errorf("points: json: forecast empty") } - if point.Properties.ForecastHourlyLink == "" { - return nil, fmt.Errorf("points: json: %v", err) + if point.Properties.ForecastHourly == "" { + return nil, fmt.Errorf("points: json: forecasthourly empty") } return point, nil } |