Commit Graph

5 Commits

Author SHA1 Message Date
argoyle bead25aa6b fix: prevent negative slice index when last exceeds items count 2026-01-01 15:09:00 +01:00
argoyle a8a1c613a4 fix(pagination): handle empty page return case
Adds a check for empty pages in the pagination logic to return a 
nil slice and empty PageInfo when there are no items to display. 
Updates tests to verify the behavior when no more items are 
available, ensuring robustness in pagination functionality.
2025-06-16 12:04:52 +02:00
argoyle 8e8bdac22c fix: update GetPage to check for empty items slice
Refactor the GetPage function to check for an empty slice of items 
instead of a nil pointer. Update tests to cover cases for nil and 
empty slices, ensuring consistent behavior and improved clarity.
2025-06-16 09:09:04 +02:00
argoyle bb3f7327cd fix(pagination): handle out-of-bounds slicing in pagination
Ensure the pagination function correctly handles out-of-bounds indices  
when slicing items. Update the slice logic to prevent slice bounds  
errors and add a test case for better coverage of edge cases.
2025-06-15 19:56:47 +02:00
argoyle 26eff55974 feat: initial version 2025-06-07 19:44:54 +02:00