mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
commit
a2fab16d3b
1 changed files with 3 additions and 2 deletions
|
|
@ -81,8 +81,9 @@ func (p *processor) create() error {
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
|
var createError error
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
log.Printf("Create failed: %s\n", resp.Status)
|
createError = fmt.Errorf("create failed: %s", resp.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
var result struct {
|
var result struct {
|
||||||
|
|
@ -100,7 +101,7 @@ func (p *processor) create() error {
|
||||||
|
|
||||||
writeStrings("Errors:", result.Errors)
|
writeStrings("Errors:", result.Errors)
|
||||||
|
|
||||||
return nil
|
return createError
|
||||||
}
|
}
|
||||||
|
|
||||||
// uploadRequest creates the request for uploading a csaf document by passing the filename.
|
// uploadRequest creates the request for uploading a csaf document by passing the filename.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue