Loading
Commits on Source 4
-
Florian Forster authored
Introduce `ScanAndCollectN`, which works like `ScanAndCollect` but stops collecting once _n_ items have been gathered. Negative values of _n_ retain the existing "collect all" behaviour, allowing `ScanAndCollect` to delegate to it. This allows capping search results before they overwhelm callers. Add an example function demonstrating how to use `ScanAndCollectN` with a note directing users toward `Scan2` when iteration is preferred over collecting into a slice.
-
Florian Forster authored
-
Florian Forster authored
feat(pagination): Add `ScanAndCollectN` to collect at most _n_ results. See merge request !2788
-
semantic-release-bot authored
## 1.43.0 ###
🚀 Features - feat(pagination): Add `ScanAndCollectN` to collect at most _n_ results. ([!2788](!2788)) by [Florian Forster](https://gitlab.com/fforster) # [1.43.0](https://gitlab.com/gitlab-org/api/client-go/compare/v1.42.0...v1.43.0) (2026-02-25) ### Features * **pagination:** Add `ScanAndCollectN` to collect at most _n_ results. ([f821c08c](f821c08c))