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

refactor: Pass printer to text handler #1420

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

TerryHowe
Copy link
Member

@TerryHowe TerryHowe commented Jun 20, 2024

What this PR does / why we need it:

Pass printer object to text handler.

  • Fewer arguments to the handlers
  • Handlers use the same mutex used elsewhere

I'm going to explore the possibility of passing the printer to the json and template handler, but trying to keep this small.

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.32%. Comparing base (37941a0) to head (c96490c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1420      +/-   ##
==========================================
- Coverage   85.33%   85.32%   -0.01%     
==========================================
  Files         106      106              
  Lines        3798     3810      +12     
==========================================
+ Hits         3241     3251      +10     
- Misses        333      334       +1     
- Partials      224      225       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TerryHowe TerryHowe force-pushed the pass-printer-to-text-handler branch 2 times, most recently from 1f3be32 to cf4f25f Compare June 20, 2024 15:07
@TerryHowe TerryHowe force-pushed the pass-printer-to-text-handler branch from cf4f25f to 0e22551 Compare June 20, 2024 15:34
@qweeah
Copy link
Contributor

qweeah commented Jun 21, 2024

I'm going to explore the possibility of passing the printer to the json and template handler, but trying to keep this small.

Making printer implement io.Writer should help.

Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

LGTM, still need other reviewer approval on the printer's implementation of io.Writer

@TerryHowe TerryHowe merged commit 145ea7a into oras-project:main Jun 21, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants