1
0
Fork 0
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:
Sascha L. Teichmann 2022-06-09 12:26:19 +02:00 committed by GitHub
parent 19d39b85d3
commit c09e5f66f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 182 additions and 110 deletions

View file

@ -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
}