From a1f95f0713dc3cbb8917b5bbe0d773bed3db6586 Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Wed, 24 Jan 2024 10:33:34 -0500 Subject: [PATCH] feat: add `OnFirstPage` method for consistency --- paginator/paginator.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paginator/paginator.go b/paginator/paginator.go index bb8aad50..82dc3ed3 100644 --- a/paginator/paginator.go +++ b/paginator/paginator.go @@ -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{