diff options
author | siddharth <s@ricketyspace.net> | 2022-05-15 23:19:17 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2022-05-15 23:19:17 -0400 |
commit | 52b2555773473a3bbc0abe05ec2c8c61ad93a353 (patch) | |
tree | c27c8b05ef526ec451068b7098b6ff9c9bed5cbe /nws | |
parent | 7b13bb91cd786277fdc67a0917cfa0dbd3776df0 (diff) |
nws: NWSPointError -> NWSError
Diffstat (limited to 'nws')
-rw-r--r-- | nws/nws.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |