mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Add type to checker messages
* Add a type to checker messages, so the results can be interpreted better. Especially the difference between warning and errors can be used.
This commit is contained in:
parent
19d39b85d3
commit
c09e5f66f3
5 changed files with 182 additions and 110 deletions
|
|
@ -53,11 +53,11 @@ func (pgs pages) listed(path string, pro *processor) (bool, error) {
|
|||
pro.badDirListings.use()
|
||||
|
||||
if err != nil {
|
||||
pro.badDirListings.add("Fetching %s failed: %v", base, err)
|
||||
pro.badDirListings.error("Fetching %s failed: %v", base, err)
|
||||
return false, errContinue
|
||||
}
|
||||
if res.StatusCode != http.StatusOK {
|
||||
pro.badDirListings.add("Fetching %s failed. Status code %d (%s)",
|
||||
pro.badDirListings.error("Fetching %s failed. Status code %d (%s)",
|
||||
base, res.StatusCode, res.Status)
|
||||
return false, errContinue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue