diff options
author | siddharth <s@ricketyspace.net> | 2022-05-21 17:51:45 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2022-05-21 17:51:45 -0400 |
commit | 7afe0925dbd6905cb3b64b72181c9f04c8ff7be1 (patch) | |
tree | 6ea1e9b06dab49b34603bbd5a57162b3aeacd188 /nws | |
parent | a4caaf7c0ea5b7495df9a9aeb91936e635000061 (diff) |
nws: add todos
Diffstat (limited to 'nws')
-rw-r--r-- | nws/nws.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2,6 +2,7 @@ // SPDX-License-Identifier: ISC // Functions for accessing the National Weather Service API. +// TODO: remove NWS prefix from all types. package nws import ( @@ -69,6 +70,8 @@ func (e NWSError) Error() string { } // NWS `/points` endpoint. +// +// TODO: return NWSError instead of error func Points(lat, lng float32) (*NWSPoint, error) { url := fmt.Sprintf("https://api.weather.gov/points/%.4f,%.4f", lat, lng) resp, err := client.Get(url) @@ -108,6 +111,8 @@ func Points(lat, lng float32) (*NWSPoint, error) { } // NWS forecast endpoint. +// +// TODO: return NWSError instead of error. func Forecast(point *NWSPoint) (*NWSForecast, error) { if point == nil { return nil, fmt.Errorf("forecast: point nil") @@ -151,6 +156,8 @@ func Forecast(point *NWSPoint) (*NWSForecast, error) { } // NWS forecast hourly endpoint. +// +// TODO: return NWSError instead of error func ForecastHourly(point *NWSPoint) (*NWSForecast, error) { if point == nil { return nil, fmt.Errorf("forecast hourly: point nil") |