mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Use errcheck to find unhandled errors (#795)
Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
@@ -38,7 +38,7 @@ func victorOpsRequest(url string, apiID string, apiKey string) ([]OnCallTeam, er
|
||||
if resp.StatusCode != 200 {
|
||||
return nil, fmt.Errorf("%s", resp.Status)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
|
||||
response := &OnCallResponse{}
|
||||
if err := json.NewDecoder(resp.Body).Decode(response); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user