Skip to content

Commit

Permalink
tweak: minor codestyle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vdjagilev committed Feb 23, 2024
1 parent 1672897 commit 3259deb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions formatter/formatter_excel.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import (
"github.com/xuri/excelize/v2"
)

var EXCEL_COL_WIDTH float64 = 50
// ExcelColWidth is the default width of the columns in the Excel file
var ExcelColWidth float64 = 50

// ExcelFormatter is struct defined for Excel Output use-case
type ExcelFormatter struct {
config *Config
}

// CellData is a struct to hold the data for a cell to avoid code duplication
type CellData struct {
sheetName string
style int
Expand Down Expand Up @@ -147,7 +149,7 @@ func (f *ExcelFormatter) writeHeaders(cd *CellData) error {
}

// Setting the width of the columns in order not to cut the text
err = cd.file.SetColWidth(cd.sheetName, "A", "B", EXCEL_COL_WIDTH)
err = cd.file.SetColWidth(cd.sheetName, "A", "B", ExcelColWidth)
if err != nil {
return err

Check warning on line 154 in formatter/formatter_excel.go

View check run for this annotation

Codecov / codecov/patch

formatter/formatter_excel.go#L154

Added line #L154 was not covered by tests
}
Expand Down

0 comments on commit 3259deb

Please sign in to comment.