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 Paginator OnFirstPage method #463

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Add Paginator OnFirstPage method #463

merged 1 commit into from
Jan 25, 2024

Conversation

maaslalani
Copy link
Contributor

@maaslalani maaslalani commented Jan 24, 2024

Adds an OnFirstPage method to use with OnLastPage for better code clarity.

Before:

if g.paginator.OnLastPage() {
    // ...
} else if g.paginator.Page == 0 {
    // ...
}

After:

if g.paginator.OnLastPage() {
    // ...
} else if g.paginator.OnFirstPage() {
    // ...
}

@maaslalani maaslalani merged commit fc18779 into master Jan 25, 2024
18 checks passed
@caarlos0 caarlos0 deleted the on-first-page branch September 12, 2024 17:34
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.

2 participants