From cac0fa9648cbe8e8b674c6acd19c9416b2b3064b Mon Sep 17 00:00:00 2001 From: Jay Patel Date: Wed, 3 Mar 2021 12:52:56 +1100 Subject: [PATCH] Updates as requested --- README.md | 6 ++++-- examples/pagination/main.go | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 105c625..74cd52a 100644 --- a/README.md +++ b/README.md @@ -225,9 +225,11 @@ func main() { Jira API has limit on maxResults it can return. You may have a usecase where you need to get all issues for given JQL. This example shows reference implementation of GetAllIssues function which does pagination on Jira API to get all the issues for given JQL -please look at examples/pagination/main.go +please look at [Pagination Example](https://github.com/andygrunwald/go-jira/blob/master/examples/pagination/main.go) + + + -``` ### Call a not implemented API endpoint Not all API endpoints of the Jira API are implemented into *go-jira*. diff --git a/examples/pagination/main.go b/examples/pagination/main.go index bc92cb6..571e9e1 100644 --- a/examples/pagination/main.go +++ b/examples/pagination/main.go @@ -15,7 +15,7 @@ func GetAllIssues(client *jira.Client, searchString string) ([]jira.Issue, error var issues []jira.Issue for { opt := &jira.SearchOptions{ - MaxResults: 1000, // Max results can go upto 1000 + MaxResults: 1000, // Max results can go up to 1000 StartAt: last, } @@ -34,7 +34,7 @@ func GetAllIssues(client *jira.Client, searchString string) ([]jira.Issue, error return issues, nil } } - return issues, nil + } func main() {