-
Notifications
You must be signed in to change notification settings - Fork 11
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
docs: Add iterator docs for go-storage #181
Conversation
Signed-off-by: Xuanwo <[email protected]>
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/beyondstorage/site/DPCFCFAt6MXMP3Pbi3ZNoo7jkZZ4 |
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
- In `nextObjectPageByDir`: | ||
- Don't use the `for` loop, our iterator already handles it. | ||
- Don't read the whole list, this will consume too much memory. | ||
- Don't store returned slices in `objectPageStatus`, handle and parse them directly to `page.Data`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly for counting the number of files we don't need to, because we have iterator for next.
objectPageStatus
only needs to store information about directories and files, the rest is optional
Fix #95
Signed-off-by: Xuanwo [email protected]