refactor: move unpackedImageSize to imgutil #1936
Merged
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.
PR is a blocker of refactoring
nerdctl (container) ps
according to #1680.Notes:
unpackedImageSize
should go intoimgutil/snapshotter.go
instead, but that file seems to be about the different snapshotters themselves, whileunpackedImageSize
is more like a utility function that happens to depend on snapshotter, just likesnapshotter
in the parameter list ofGetExistingImage
, so I put it intoimgutil/imgutil.go
eventually.pkg/cmd/image/list.go
.@Zheaoli Regarding #1821 (comment), please let me know if you've already started working on this, and I can close my PR accordingly. I created this PR because it's been a while since that comment, and I guess you may have been occupied by something else :)
Signed-off-by: Hsing-Yu (David) Chen davidhsingyuchen@gmail.com