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

Add OpenReader to local store #5140

Merged
merged 1 commit into from
Mar 8, 2021
Merged

Add OpenReader to local store #5140

merged 1 commit into from
Mar 8, 2021

Conversation

mxpv
Copy link
Member

@mxpv mxpv commented Mar 8, 2021

Add OpenReaderfunc to create ReaderAt interface from a file system path to simplify local store hacking.
This doesn't change any logic, just makes existing code more reusable.

Signed-off-by: Maksym Pavlenko pavlenko.maksym@gmail.com

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 8, 2021

Build succeeded.

@@ -27,6 +32,28 @@ type sizeReaderAt struct {
fp *os.File
}

func OpenReader(p string) (content.ReaderAt, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Odd that the linter didn't complain about the lack of documentation comment

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 8, 2021

Build succeeded.

Copy link
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

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

LGTM

@dmcgowan dmcgowan merged commit f6a07f4 into containerd:master Mar 8, 2021
@mxpv mxpv deleted the reader branch March 24, 2021 17:18
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.

None yet

4 participants