Closed TerryHowe closed 2 weeks ago
Attention: Patch coverage is 71.42857%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 85.06%. Comparing base (
8027e16
) to head (c880581
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@TerryHowe What kind of problem is expected to be resolved by this PR? Moving print-related utilities out of status
folder is doable, but status
package including the handlers should be placed side-by-side with metadata
in the same folder level.
Taking pull artifact as an example:
$ oras pull --oci-layout hello:latest --no-tty
Downloading a948904f2f0f hello.txt
Downloaded a948904f2f0f hello.txt
Pulled [oci-layout] hello:latest
Digest: sha256:6ca2cbb8dc842320c8b9ae609dfb2f9a83eb0be382cbc0c75c6bbdd51a15b242
Status output:
Downloading a948904f2f0f hello.txt
Downloaded a948904f2f0f hello.txt
Metadata output:
Pulled [oci-layout] hello:latest
Digest: sha256:6ca2cbb8dc842320c8b9ae609dfb2f9a83eb0be382cbc0c75c6bbdd51a15b242
I just created this PR to give better separation of concerns and avoid possible circular dependencies. The Printer is a like a logging system and really shouldn't be dependent on what it logs.
@TerryHowe Got it, then this PR should only move print.go
and print_test.go
What this PR does / why we need it:
The printer is supposed to be a very generic output object and this change moves in that direction.