limitops

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Limit

func Limit[T any](values []T, limit int) []T

Limit returns values truncated to at most limit items. A non-positive limit means no truncation, matching call sites where zero is an unset limit.

func LimitClone

func LimitClone[T any](values []T, limit int) []T

LimitClone returns a shallow copy truncated to at most limit items. A non-positive limit means no truncation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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