Skip to content

Commit

Permalink
feat: add OnFirstPage method for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed Jan 25, 2024
1 parent 6399027 commit fc18779
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions paginator/paginator.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ func (m Model) OnLastPage() bool {
return m.Page == m.TotalPages-1
}

// OnFirstPage returns whether or not we're on the first page.
func (m Model) OnFirstPage() bool {
return m.Page == 0
}

// New creates a new model with defaults.
func New() Model {
return Model{
Expand Down

0 comments on commit fc18779

Please sign in to comment.