Documentation
¶
Overview ¶
Package paging applies bounded offset/limit windows without integer overflow.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bounds ¶
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 PageOffset ¶ added in v0.3.4
PageOffset saturates a one-based page multiplication rather than overflowing.
func ParseLimit ¶ added in v0.3.4
ParseLimit accepts an empty query value as the default and rejects invalid bounds.
func ParseOffset ¶ added in v0.3.4
ParseOffset rejects offsets whose next page could overflow an int.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.