Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
a9f71e37
Commit
a9f71e37
authored
Nov 15, 2018
by
Alexander Matyushentsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update getPagination method comment
parent
e10b8232
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
github.go
connector/github/github.go
+4
-4
No files found.
connector/github/github.go
View file @
a9f71e37
...
@@ -503,10 +503,10 @@ func get(ctx context.Context, client *http.Client, apiURL string, v interface{})
...
@@ -503,10 +503,10 @@ func get(ctx context.Context, client *http.Client, apiURL string, v interface{})
return
getPagination
(
apiURL
,
resp
),
nil
return
getPagination
(
apiURL
,
resp
),
nil
}
}
// getPagination checks the "Link" header field for "next" or "last" pagination
// getPagination checks the "Link" header field for "next" or "last" pagination
URLs,
//
URLs, and returns true only if a "next" URL is found. The next pages' URL is
//
and returns "next" page URL or empty string to indicate that there are no more pages.
//
returned if a "next" URL is found. apiURL is returned if apiURL equals th
e
//
Non empty next pages' URL is returned if both "last" and "next" URLs are found and next pag
e
//
"last" URL or no "next" or "last" URL are found
.
//
URL is not equal to last
.
//
//
// https://developer.github.com/v3/#pagination
// https://developer.github.com/v3/#pagination
func
getPagination
(
apiURL
string
,
resp
*
http
.
Response
)
string
{
func
getPagination
(
apiURL
string
,
resp
*
http
.
Response
)
string
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment