Skip to content

Commit

Permalink
Updates as requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Patel committed Mar 3, 2021
1 parent 9c2ab8f commit cac0fa9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*.
Expand Down
4 changes: 2 additions & 2 deletions examples/pagination/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand All @@ -34,7 +34,7 @@ func GetAllIssues(client *jira.Client, searchString string) ([]jira.Issue, error
return issues, nil
}
}
return issues, nil

}

func main() {
Expand Down

0 comments on commit cac0fa9

Please sign in to comment.