Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
dex
Commits
a9f71e37
Commit
a9f71e37
authored
6 years ago
by
Alexander Matyushentsev
Browse files
Options
Downloads
Patches
Plain Diff
Update getPagination method comment
parent
e10b8232
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
connector/github/github.go
+4
-4
4 additions, 4 deletions
connector/github/github.go
with
4 additions
and
4 deletions
connector/github/github.go
+
4
−
4
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
no
t 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
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment