feat(logging): debug with extracted values
This commit is contained in:
parent
fafd94b075
commit
eaaddf3341
@ -76,7 +76,11 @@ func Create(out, dir string) error {
|
|||||||
return fmt.Errorf("strange numbers of matches")
|
return fmt.Errorf("strange numbers of matches")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := f.SetCellStr("Sheet1", fmt.Sprintf("A%d", i+1), res[0][1]); err != nil {
|
company := res[0][1]
|
||||||
|
|
||||||
|
log.Debug("extracted", slog.String("company", company))
|
||||||
|
|
||||||
|
if err := f.SetCellStr("Sheet1", fmt.Sprintf("A%d", i+1), company); err != nil {
|
||||||
return fmt.Errorf("failed to set cell: %w", err)
|
return fmt.Errorf("failed to set cell: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +89,11 @@ func Create(out, dir string) error {
|
|||||||
return fmt.Errorf("failed to parse value: %w", err)
|
return fmt.Errorf("failed to parse value: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := f.SetCellValue("Sheet1", fmt.Sprintf("B%d", i+1), math.Round(value*100)/100); err != nil {
|
rValue := math.Round(value*100) / 100
|
||||||
|
|
||||||
|
log.Debug("extracted", slog.Float64("value", rValue))
|
||||||
|
|
||||||
|
if err := f.SetCellValue("Sheet1", fmt.Sprintf("B%d", i+1), rValue); err != nil {
|
||||||
return fmt.Errorf("failed to set cell: %w", err)
|
return fmt.Errorf("failed to set cell: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user