oras-project / oras

OCI registry client - managing content like artifacts, images, packages
https://oras.land
Apache License 2.0
1.33k stars 160 forks source link

refactor: Use printer object for output #1426

Closed TerryHowe closed 1 week ago

TerryHowe commented 1 week ago

What this PR does / why we need it:

Change the last calls to fmt.Fprint to use the printer object.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.26%. Comparing base (145ea7a) to head (1bc45dc).

Files Patch % Lines
cmd/oras/root/login.go 66.66% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1426 +/- ## ========================================== - Coverage 85.32% 85.26% -0.07% ========================================== Files 106 106 Lines 3810 3808 -2 ========================================== - Hits 3251 3247 -4 - Misses 334 336 +2 Partials 225 225 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

TerryHowe commented 1 week ago

I think we can add a dedicated option to reduce duplicated output.NewPrinter(cmd.OutOrStdout(), opts.Verbose) though

I should probably step back and look at where this has gone. Generally, I'm pretty happy, but I'm sure there is room for improvement somewhere.