style: GetFormatsFormats

This commit is contained in:
Vlad Klokun
2022-12-22 15:00:59 +02:00
committed by Vlad Klokun
parent cb38a4e8a1
commit 9ae9d35ccb
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -187,7 +187,8 @@ func (scanInfo *ScanInfo) setUseFrom() {
}
}
func (scanInfo *ScanInfo) GetFormats() []string {
// Formats returns a slice of output formats that have been requested for a given scan
func (scanInfo *ScanInfo) Formats() []string {
return strings.Split(scanInfo.Format, ",")
}
+1 -1
View File
@@ -94,7 +94,7 @@ func getInterfaces(scanInfo *cautils.ScanInfo) componentInterfaces {
reportHandler := getReporter(tenantConfig, scanInfo.ScanID, scanInfo.Submit, scanInfo.FrameworkScan, scanInfo.GetScanningContext())
// setup printers
formats := scanInfo.GetFormats()
formats := scanInfo.Formats()
printerHandlers := make([]printer.IPrinter, 0)
for _, format := range formats {