mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
This commit is contained in:
parent
6955c4e37c
commit
34705f3c6e
1 changed files with 1 additions and 2 deletions
|
|
@ -76,11 +76,10 @@ func (l *schemaLoader) loadHTTPURL(url string) (any, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
_ = resp.Body.Close()
|
|
||||||
return nil, fmt.Errorf("%s returned status code %d", url, resp.StatusCode)
|
return nil, fmt.Errorf("%s returned status code %d", url, resp.StatusCode)
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
|
||||||
|
|
||||||
return jsonschema.UnmarshalJSON(resp.Body)
|
return jsonschema.UnmarshalJSON(resp.Body)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue