From 441696da61af739f8cdadf122e7a669452094fbb Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 5 Jun 2024 12:11:33 -0600 Subject: Extract EachIssue function to allow support for paginating through results --- cmd/stanuki/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cmd') 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) - } + }) } -- cgit v1.2.3