mirror of
https://github.com/gfleury/go-bitbucket-v1.git
synced 2025-07-04 13:02:52 -05:00
Better checks on HasNextPage
This commit is contained in:
@ -555,6 +555,7 @@ func NewRawAPIResponse(r *http.Response) (*APIResponse, error) {
|
||||
|
||||
// HasNextPage returns if response is paged and has next page and where it does start
|
||||
func HasNextPage(response *APIResponse) (isLastPage bool, nextPageStart int) {
|
||||
isLastPage = true
|
||||
isLastPage, ok := response.Values["isLastPage"].(bool)
|
||||
if ok && !isLastPage {
|
||||
floatStart, ok := response.Values["nextPageStart"].(float64)
|
||||
|
Reference in New Issue
Block a user