summaryrefslogtreecommitdiffstats
path: root/nws
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2022-05-15 23:19:17 -0400
committersiddharth <s@ricketyspace.net>2022-05-15 23:19:17 -0400
commit52b2555773473a3bbc0abe05ec2c8c61ad93a353 (patch)
treec27c8b05ef526ec451068b7098b6ff9c9bed5cbe /nws
parent7b13bb91cd786277fdc67a0917cfa0dbd3776df0 (diff)
nws: NWSPointError -> NWSError
Diffstat (limited to 'nws')
-rw-r--r--nws/nws.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/nws/nws.go b/nws/nws.go
index e58140b..0c6d6e0 100644
--- a/nws/nws.go
+++ b/nws/nws.go
@@ -24,14 +24,14 @@ type NWSPoint struct {
Properties NWSPointProperties
}
-type NWSPointError struct {
+type NWSError struct {
Title string
Type string
Status int
Detail string
}
-func (e NWSPointError) Error() string {
+func (e NWSError) Error() string {
return fmt.Sprintf("%d: %s: %s", e.Status, e.Type, e.Detail)
}
@@ -51,7 +51,7 @@ func Points(lat, lng float32) (*NWSPoint, error) {
// Check if the request failed.
if resp.StatusCode != 200 {
- perr := new(NWSPointError)
+ perr := new(NWSError)
err := json.Unmarshal(body, perr)
if err != nil {
return nil, fmt.Errorf("points: json: %v", err)