Fix unchecked error on resp.Body.Close in genmodels
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -96,7 +96,7 @@ func main() {
|
|||||||
fmt.Fprintf(os.Stderr, "cannot fetch models: %v\n", err)
|
fmt.Fprintf(os.Stderr, "cannot fetch models: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer func() { _ = resp.Body.Close() }()
|
||||||
|
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
fmt.Fprintf(os.Stderr, "cannot fetch models: unexpected status %s\n", resp.Status)
|
fmt.Fprintf(os.Stderr, "cannot fetch models: unexpected status %s\n", resp.Status)
|
||||||
|
|||||||
Reference in New Issue
Block a user