Lint Tests Passing
All checks were successful
Continuous Integration / CI (push) Successful in 1m40s

Made lint tests pass
This commit is contained in:
sjc
2025-05-08 00:36:03 -04:00
parent 1f5d003470
commit ada6d2d440
14 changed files with 39 additions and 39 deletions

4
api.go
View File

@@ -50,7 +50,7 @@ func (api *TastytradeAPI) fetchData(url string) (map[string]interface{}, error)
if err != nil {
return nil, err
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode >= 400 && resp.StatusCode < 500 {
return nil, fmt.Errorf("client error occurred: status code %d", resp.StatusCode)
@@ -78,7 +78,7 @@ func (api *TastytradeAPI) fetchDataAndUnmarshal(urlVal string, v interface{}) er
if err != nil {
return err
}
defer resp.Body.Close()
defer func() { _= resp.Body.Close() }()
if resp.StatusCode >= 400 && resp.StatusCode < 500 {
return fmt.Errorf("client error occurred: status code %d", resp.StatusCode)