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(oci-layout): use Parser to process option input #736

Merged
merged 16 commits into from
Jan 10, 2023

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Jan 6, 2023

This PR adds a new option parser which can be used to process input before cmd execution. This change will be used in OCI layout support.

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
cmd/oras/internal/option/parser.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/platform.go Outdated Show resolved Hide resolved
cmd/oras/pull.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Show resolved Hide resolved
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@codecov-commenter
Copy link

Codecov Report

Merging #736 (2f9aff4) into main (1659011) will decrease coverage by 0.16%.
The diff coverage is 81.81%.

@@            Coverage Diff             @@
##             main     #736      +/-   ##
==========================================
- Coverage   73.17%   73.00%   -0.17%     
==========================================
  Files          16       17       +1     
  Lines         574      589      +15     
==========================================
+ Hits          420      430      +10     
- Misses        123      127       +4     
- Partials       31       32       +1     
Impacted Files Coverage Δ
cmd/oras/internal/option/remote.go 67.46% <0.00%> (-0.83%) ⬇️
cmd/oras/internal/option/parser.go 82.35% <82.35%> (ø)
cmd/oras/internal/option/applier.go 100.00% <100.00%> (ø)
cmd/oras/internal/option/platform.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
cmd/oras/internal/option/platform.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/parser.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/parser_test.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/parser.go Outdated Show resolved Hide resolved
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

@shizhMSFT shizhMSFT merged commit dd279cd into oras-project:main Jan 10, 2023
TerryHowe pushed a commit to TerryHowe/oras that referenced this pull request Feb 2, 2023
…t#736)

This PR adds a new option parser which can be used to process input
before cmd execution. This change will be used in OCI layout support.

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
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.

3 participants