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

Added pagination helper #1741

Closed
wants to merge 1 commit into from
Closed

Conversation

Roemer
Copy link

@Roemer Roemer commented Jun 21, 2023

Added a pretty flexible pagination helper.

It allows to abort on certain criterias and also to process the items after each page if wanted.

Open for discussion!

@timofurrer
Copy link
Collaborator

I've implemented something similar in #1498 🤔

@timofurrer
Copy link
Collaborator

I guess iterators would also be nice for this once they land 🤔

@Roemer
Copy link
Author

Roemer commented Oct 27, 2023

Any feedback here? I still think this would be a good addition.

@JordanP
Copy link
Contributor

JordanP commented Feb 2, 2024

There's not a lot of Gitlab specific things in there. It increases the API for something that could live outside of this package. For some reason I prefer the aesthetics of #1498 Also maybe we should wait for "official" support of Iterator in Go ?

@costela
Copy link
Contributor

costela commented Feb 7, 2024

O somehow totally missed this PR and duplicated some of the work here: #1875
Apologies for that 😓

That PR also includes initial rangefunc support, now that iterators are a thing (albeit experimentally).

@svanharmelen
Copy link
Member

I think I'm going for PR #1875 for adding a form of pagination support. If you think that solution can or should be changed/updated (including naming or ergonomics) than please comment on that PR so we can get to some kind of consensus before merging that one 😏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants