Returns error instead of printf
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -722,11 +722,9 @@ func (s FrameworkService) buildSOARowData(ctx context.Context, conn pg.Conn, con
|
|||||||
|
|
||||||
func (s FrameworkService) createSOAExcelFile(framework *coredata.Framework, soaData []soaRowData) (io.Reader, error) {
|
func (s FrameworkService) createSOAExcelFile(framework *coredata.Framework, soaData []soaRowData) (io.Reader, error) {
|
||||||
f := excelize.NewFile()
|
f := excelize.NewFile()
|
||||||
defer func() {
|
|
||||||
if err := f.Close(); err != nil {
|
if err := f.Close(); err != nil {
|
||||||
fmt.Printf("Error closing Excel file: %v\n", err)
|
return nil, fmt.Errorf("cannot close Excel file: %w", err)
|
||||||
}
|
}
|
||||||
}()
|
|
||||||
|
|
||||||
sheetName := "State of Applicability"
|
sheetName := "State of Applicability"
|
||||||
f.SetSheetName("Sheet1", sheetName)
|
f.SetSheetName("Sheet1", sheetName)
|
||||||
|
|||||||
Reference in New Issue
Block a user