[Refactor] Refactor all the GlobalCommandOptions from pointer to value reference#1824
Merged
AkihiroSuda merged 1 commit intoJan 11, 2023
Conversation
d24973b to
d55d655
Compare
djdongjin
reviewed
Jan 10, 2023
Member
djdongjin
left a comment
There was a problem hiding this comment.
Overall LGTM, left some minor comments. thanks
Comment on lines
+47
to
49
| func getVolumeStore(globalOptions types.GlobalCommandOptions) (volumestore.VolumeStore, error) { | ||
| return volume.Store(globalOptions.Namespace, globalOptions.DataRoot, globalOptions.Address) | ||
| } |
Member
There was a problem hiding this comment.
I suggest we remove this function and use volume.Store (the 2nd one below) directly (we can change volume.Store to accept a globalOptions) (Don't necessarily be part of this PR though)
This adds one unnecessary wrap on volume create:
Lines 47 to 49 in 40d341d
nerdctl/pkg/cmd/volume/volume.go
Lines 26 to 32 in 40d341d
Member
Author
There was a problem hiding this comment.
This should be another PR, I will update ASAP
djdongjin
approved these changes
Jan 10, 2023
d55d655 to
be4beca
Compare
be4beca to
8b60831
Compare
3be396f to
90eedf0
Compare
…e reference Signed-off-by: Zheao.Li <me@manjusaka.me>
90eedf0 to
f54251c
Compare
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.
Based on the discussion #1820 (comment)
Signed-off-by: Zheao.Li me@manjusaka.me