Discover Packages
github.com/braedonsaunders/ether
internal
frontend
kit
paging
package
Version:
v0.3.1
Opens a new window with list of versions in this module.
Published: Nov 1, 2026
License: GPL-3.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package paging applies bounded offset/limit windows without integer overflow.
func Bounds(total, offset, limit int ) (start, end int )
Bounds returns a safe half-open slice interval. A negative offset is treated
as zero; a negative limit means no limit, while zero requests an empty page.
func Slice[T any ](items []T, offset, limit int ) []T
Slice returns the requested page, preserving the source order.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.