Fix list_options GetStartEnd (#16303) (#16305)

end is start + pageSize and not start + page

Co-authored-by: sebastian-sauer <sauer.sebastian@gmail.com>
This commit is contained in:
6543 2021-06-30 01:23:24 +02:00 committed by GitHub
parent c7db7438b7
commit 50084daa4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ func (opts *ListOptions) setEnginePagination(e Engine) Engine {
func (opts *ListOptions) GetStartEnd() (start, end int) {
opts.setDefaultValues()
start = (opts.Page - 1) * opts.PageSize
end = start + opts.Page
end = start + opts.PageSize
return
}