diff --git a/pkg/compliance/io.go b/pkg/compliance/io.go index e3253f3e8..c0acb17a3 100644 --- a/pkg/compliance/io.go +++ b/pkg/compliance/io.go @@ -64,7 +64,7 @@ func (w *cm) GenerateComplianceReport(ctx context.Context, spec v1alpha1.ReportS //create cluster compliance details report err = w.createComplianceDetailReport(ctx, spec, smd, checkIdsToResults, st) if err != nil { - return fmt.Errorf("failed to create compliance detail report name: %s with error %v", strings.ToLower(fmt.Sprintf("%s-%s", spec.Name, "details")), err) + return fmt.Errorf("failed to create compliance detail report name: %s with error %w", strings.ToLower(fmt.Sprintf("%s-%s", spec.Name, "details")), err) } //generate cluster compliance report updatedReport, err := w.createComplianceReport(ctx, spec, st, controlChecks)