Closed TerryHowe closed 2 months ago
Attention: Patch coverage is 93.10345%
with 4 lines
in your changes are missing coverage. Please review.
Project coverage is 82.02%. Comparing base (
f1d319f
) to head (4417131
). Report is 19 commits behind head on main.:exclamation: Current head 4417131 differs from pull request most recent head 1db763f. Consider uploading reports for the commit 1db763f to get more accurate results
Files | Patch % | Lines |
---|---|---|
cmd/oras/root/login.go | 66.66% | 1 Missing and 2 partials :warning: |
cmd/oras/root/discover.go | 87.50% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@TerryHowe I added a new Printer
interface to display package to unify the output into STDOUT.
It provides PrintXXX
to wrap fmt.FprintXXX
utilities, also provides PrintJSON
and ParseAndWrite
for formatted output
To reflect your changes in #1288, cobra.Command.OutOrStdout can be injected via below interface https://github.com/oras-project/oras/blob/61e0241fe11342ca27065b8e3cb4bf66ba142d15/cmd/oras/internal/display/metadata/view/printer.go#L27-L31
Please help you help review related changes in #1310 and let me know your comment on this design, thanks.
@TerryHowe I have added another solution in https://github.com/oras-project/oras/pull/1314, please let me know if it meets your expectation.
What this PR does / why we need it:
Create a printer object to manage output