From f23a9dd62f0b8fddb708dcc7abf09ee7418af41b Mon Sep 17 00:00:00 2001 From: Rex Pan Date: Thu, 2 Mar 2023 11:02:07 +1100 Subject: [PATCH] Add some additional comments Signed-off-by: Rex Pan --- clients/osv.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clients/osv.go b/clients/osv.go index 8dce7170ce1..9e4c3e92b06 100644 --- a/clients/osv.go +++ b/clients/osv.go @@ -48,10 +48,12 @@ func (v osvClient) ListUnfixedVulnerabilities( }, nil) // TODO: Do logging? response := VulnerabilitiesResponse{} - if err == nil { + + if err == nil { // No vulns found return response, nil } + // If vulnerabilities are found, err will be set to osvscanner.VulnerabilitiesFoundErr if errors.Is(err, osvscanner.VulnerabilitiesFoundErr) { vulns := res.Flatten() for i := range vulns {