Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated way in what skip items were calculated. if skip count was > 0… #11

Merged
merged 1 commit into from
Mar 15, 2021

Conversation

YZherebukh
Copy link
Contributor

@YZherebukh YZherebukh commented Mar 15, 2021

Fix bug with skip number (func getSkip()).
If skipped value is grater than 0, it should be decreased by one, sine indexes in slice starting from 0

…, than it should be decreased bt one, since indexes in slice starting from 0
@gobeam
Copy link
Owner

gobeam commented Mar 15, 2021

Fix bug with skip number (func getSkip()).
If skipped value is grater than 0, it should be decreased by one, sine indexes in slice starting from 0

I won't actually call it a bug in package because it is unexported method and condition are already checked if user tries to assign negative numbers in Page and Limit method which fallbacks to default value. But still looking at the current method your solution is very good addition and I'll be merging the solution. Thanks for the test cases too. Cheers 🍻 🍻

@gobeam gobeam added the enhancement New feature or request label Mar 15, 2021
@gobeam gobeam merged commit d2740ac into gobeam:master Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants