From 7afe0925dbd6905cb3b64b72181c9f04c8ff7be1 Mon Sep 17 00:00:00 2001 From: siddharth Date: Sat, 21 May 2022 17:51:45 -0400 Subject: nws: add todos --- nws/nws.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nws/nws.go b/nws/nws.go index 4fc1727..93c57ef 100644 --- a/nws/nws.go +++ b/nws/nws.go @@ -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") -- cgit v1.2.3