fix: update GetPage to check for empty items slice #13

Merged
argoyle merged 1 commits from fix-getpage-empty-items-check into main 2025-06-16 07:12:35 +00:00
argoyle commented 2025-06-16 07:09:15 +00:00 (Migrated from gitlab.com)

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.

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.
argoyle (Migrated from gitlab.com) scheduled this pull request to auto merge when all checks succeed 2025-06-16 07:09:24 +00:00
argoyle (Migrated from gitlab.com) merged commit into main 2025-06-16 07:12:35 +00:00
argoyle commented 2025-06-16 07:12:38 +00:00 (Migrated from gitlab.com)

Codecov Report

All modified and coverable lines are covered by tests

Project coverage is 64.19%. Comparing base (704b755) to head (8e8bdac).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #12   +/-   ##
=======================================
  Coverage   64.19%   64.19%           
=======================================
  Files           1        1           
  Lines          81       81           
=======================================
  Hits           52       52           
  Misses         28       28           
  Partials        1        1           

View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
## [Codecov](https://app.codecov.io/gl/unboundsoftware/pagination/pull/12?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware) Report All modified and coverable lines are covered by tests :white_check_mark: > Project coverage is 64.19%. Comparing base [(`704b755`)](https://app.codecov.io/gl/unboundsoftware/pagination/commit/704b755c4ca9f8744c66fc038b61e5ce4c34e7a1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware) to head [(`8e8bdac`)](https://app.codecov.io/gl/unboundsoftware/pagination/commit/8e8bdac22c474b468552490870f09305487b0eae?dropdown=coverage&el=desc&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware). <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## main #12 +/- ## ======================================= Coverage 64.19% 64.19% ======================================= Files 1 1 Lines 81 81 ======================================= Hits 52 52 Misses 28 28 Partials 1 1 ``` </details> [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gl/unboundsoftware/pagination/pull/12?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware). :loudspeaker: Have feedback on the report? [Share it here](https://gitlab.com/codecov-open-source/codecov-user-feedback/-/issues/4). <details><summary> :rocket: New features to boost your workflow: </summary> - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems. </details>
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unboundsoftware/pagination#13