Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly align displayed results using TabWriter #39

Merged
merged 4 commits into from Mar 31, 2024

Conversation

mmourick
Copy link
Collaborator

@mmourick mmourick commented Mar 6, 2024

What

  • Properly aligns the printed table using a TabWriter, depending on the width of the content and the amount of columns in the table.
  • Await all queries to be done before printing results in tabulated format.

Why

  • Previous implementation would occasionally misalign the output.
  • Using ansiterm's TabWriter instead of the standard library implementation because the native one does not handle color coded strings correctly.

References

image

@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Mar 6, 2024
Copy link
Owner

@bschaatsbergen bschaatsbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@bschaatsbergen bschaatsbergen merged commit 97268da into main Mar 31, 2024
5 checks passed
@bschaatsbergen bschaatsbergen deleted the feat/improve-output-formatting branch March 31, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants