diff options
| author | mo khan <mo@mokhan.ca> | 2024-06-05 12:11:33 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2024-06-05 12:11:33 -0600 |
| commit | 441696da61af739f8cdadf122e7a669452094fbb (patch) | |
| tree | fbbaf95aa2d6abe2fb43bd88eb759a28c7e9512f /cmd | |
| parent | 9d425f05f2eb8d16a89d2038c316be8209d17da9 (diff) | |
Extract EachIssue function to allow support for paginating through results
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/stanuki/main.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/stanuki/main.go b/cmd/stanuki/main.go index 7288c7f..9b4fca3 100644 --- a/cmd/stanuki/main.go +++ b/cmd/stanuki/main.go @@ -11,8 +11,7 @@ import ( func main() { gl := gitlab.New(context.TODO(), env.Fetch("GITLAB_TOKEN", "")) - issues := gl.Group(9970).Issues() - for _, issue := range issues { + gl.Group(9970).EachIssue(func(issue *gitlab.Issue) { fmt.Printf("%v: %v\n", issue.ID, issue.Title) - } + }) } |
