Repository navigation
Conversation
The deprecation message used opts.Template, which is only set for the go-template format, so "oras discover -o json" suggested "--format " with an empty value. Use the parsed format type instead. Signed-off-by: Ogulcan Aydogan <[email protected]>
ogulcanaydogan
requested review from
TerryHowe,
Wwwsylvia,
sabre1041,
sajayantony and
shizhMSFT
as code owners
October 24, 2026 22:41
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2297 +/- ##
==========================================
+ Coverage 60.95% 61.85% +0.90%
==========================================
Files 140 140
Lines 6098 6098
==========================================
+ Hits 3717 3772 +55
+ Misses 2161 2102 -59
- Partials 220 224 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
The deprecation message of
oras discover -o/--outputusedopts.Template, which is only set for thego-templateformat, so it suggested--formatwith an empty value fortree,tableandjson:It now prints the parsed format type (
opts.Format.Type), for example--format json. The new testTestDiscoverCmd_OutputDeprecationMessageruns the command'sPreRunEfor each of the three formats and checks the message on stderr. It fails without the change.Which issue(s) this PR fixes:
Fixes #2296
Please check the following list: