Documentation ¶ Overview ¶ Package pagination holds the in-memory windowing primitive shared by the handler and service layers, so the two cannot drift apart. Index ¶ func Window[T any](items []T, limit, offset int) []T 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. Source Files ¶ View all Source files pagination.go Click to show internal directories. Click to hide internal directories.