mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 15:45:48 +03:00
[GH-ISSUE #450] Replace tabwriter with tablewriter for bordered table output #127
Labels
No labels
bug
bug
documentation
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/App-Store-Connect-CLI#127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rudrankriyam on GitHub (Feb 8, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/450
Problem
All
--output tablerendering currently uses Go'stext/tabwriter, which produces borderless, space-aligned columns:This is functional but hard to scan visually, especially for wide tables with many columns (subscriptions pricing, Game Center leaderboards, Xcode Cloud workflows, etc.).
Proposed solution
Replace
text/tabwriterwithgithub.com/olekukonenko/tablewriterto get Unicode box-bordered tables:Why tablewriter
go-pretty). Current binary is ~22MB, so this is negligible.Scope
There are ~340
tabwriter.NewWritercall sites across the codebase:internal/asc/(the output formatters)internal/cli/(subscriptions pricing, IAP prices, migrate, shared)internal/cli/shared/shared.go(help rendering — leave as-is)The histogram in
reviews_ratings.go(printHistogramRows) usesfmt.Printfwith█bars, not tabwriter — it should also be migrated for consistency.Implementation plan
RenderTable(headers []string, rows [][]string)helper ininternal/asc/that wrapstablewriterwith Unicode box-drawing style. This centralizes border style so it can be changed in one place.internal/asc/— eachprintXxxTablefunction currently builds atabwriter, writes header + rows, and flushes. Replace with: build[][]stringrows, callRenderTable. This is mechanical but touches ~60 files.subscriptions/pricing.go,iap/prices.go,migrate/migrate_output.go.reviews_ratings.goto use the same bordered style.DefaultUsageFunc) ontabwriter— it's not data output, and bordered help text would look wrong.RenderTableitself.Sequencing with #444
This pairs well with #444 (output registry refactor). Ideal order:
However, this can also be done standalone since the migration is mechanical (swap
tabwritercalls forRenderTablecalls).Acceptance criteria
tablewriteradded togo.modRenderTablehelper with Unicode box-drawing bordersprintXxxTablefunctions ininternal/asc/migratedDefaultUsageFunc) unchangedmake testpassesmake lintpassesasc apps list --output tableshows bordered output