pagination

package
v0.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package pagination holds the in-memory windowing primitive shared by the handler and service layers, so the two cannot drift apart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Window

func Window[T any](items []T, limit, offset int) []T

Window returns the [offset, offset+limit) slice of items, clamped to the bounds of items. It is used to window a fully-materialized, bounded collection. An out-of-range offset or a non-positive limit yields an empty (non-nil) slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL