isolate record reading and writing from processing
All checks were successful
Tests / tests (pull_request) Successful in 17s

This commit is contained in:
2025-11-13 14:07:08 +00:00
parent d3fa025a92
commit 70bd8622de
9 changed files with 301 additions and 171 deletions

View File

@@ -12,7 +12,8 @@ import (
func main() {
err := run()
if err != nil {
slog.Error("fatal error", slog.Any("err", err))
slog.Error("found a fatal issue", slog.Any("err", err))
os.Exit(1)
}
}
@@ -24,9 +25,9 @@ func run() error {
reader := trading212.NewRecordReader(f)
reporter := internal.NewReporter(reader)
writer := internal.NewStdOutLogger()
err = reporter.Run()
err = internal.BuildReport(reader, writer)
if err != nil {
return err
}