separate print logic from write logic

This commit is contained in:
2025-12-04 13:04:30 +00:00
parent f651ce8597
commit b12c519fdb
7 changed files with 462 additions and 233 deletions

View File

@@ -55,7 +55,7 @@ func run(ctx context.Context, platform string) error {
reader := factory()
writer := internal.NewTableWriter(os.Stdout)
writer := internal.NewAggregatorWriter()
eg.Go(func() error {
return internal.BuildReport(ctx, reader, writer)
@@ -66,7 +66,9 @@ func run(ctx context.Context, platform string) error {
return err
}
writer.Render()
printer := NewPrettyPrinter(os.Stdout)
printer.Render(writer)
return nil
}