diff --git a/core/pkg/resultshandling/printer/v2/attacktracks.go b/core/pkg/resultshandling/printer/v2/attacktracks.go index 48369277..852bd007 100644 --- a/core/pkg/resultshandling/printer/v2/attacktracks.go +++ b/core/pkg/resultshandling/printer/v2/attacktracks.go @@ -95,7 +95,7 @@ func (prettyPrinter *PrettyPrinter) printAttackTracks(opaSessionObj *cautils.OPA }) for i := 0; i < topResourceCount && i < len(resources); i++ { - fmt.Fprintf(prettyPrinter.writer, "\n"+getSeparator("^")+"\n") + fmt.Fprintf(prettyPrinter.writer, "\n%s\n", getSeparator("^")) resource := resources[i] resourceObj := opaSessionObj.AllResources[resource.ResourceID] diff --git a/core/pkg/resultshandling/printer/v2/prettyprinter.go b/core/pkg/resultshandling/printer/v2/prettyprinter.go index 3ef9a5db..451c9813 100644 --- a/core/pkg/resultshandling/printer/v2/prettyprinter.go +++ b/core/pkg/resultshandling/printer/v2/prettyprinter.go @@ -121,9 +121,8 @@ func (pp *PrettyPrinter) ActionPrint(_ context.Context, opaSessionObj *cautils.O if opaSessionObj != nil { // TODO line is currently printed on framework scan only if isPrintSeparatorType(pp.scanType) { - fmt.Fprintf(pp.writer, "\n"+ - gchalk.WithAnsi256(238).Bold(fmt.Sprintf("%s\n", strings.Repeat("─", 50)))+ - "\n") + fmt.Fprintf(pp.writer, "\n%s\n\n", + gchalk.WithAnsi256(238).Bold(strings.Repeat("─", 50))) } else { fmt.Fprintf(pp.writer, "\n") } diff --git a/core/pkg/resultshandling/printer/v2/resourcetable.go b/core/pkg/resultshandling/printer/v2/resourcetable.go index 759ef780..d87e437d 100644 --- a/core/pkg/resultshandling/printer/v2/resourcetable.go +++ b/core/pkg/resultshandling/printer/v2/resourcetable.go @@ -43,7 +43,7 @@ func (prettyPrinter *PrettyPrinter) resourceTable(opaSessionObj *cautils.OPASess if resource.GetNamespace() != "" { fmt.Fprintf(prettyPrinter.writer, "Namespace: %s\n", resource.GetNamespace()) } - fmt.Fprintf(prettyPrinter.writer, "\n"+prettyprinter.ControlCountersForResource(result.ListControlsIDs(nil))+"\n\n") + fmt.Fprintf(prettyPrinter.writer, "\n%s\n\n", prettyprinter.ControlCountersForResource(result.ListControlsIDs(nil))) summaryTable := tablewriter.NewWriter(prettyPrinter.writer)