Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly set and advance current page #330

Merged
merged 1 commit into from
Jan 17, 2022

Conversation

smaeda-ks
Copy link
Contributor

This is a bug fix. Right now, the Page field is not handled correctly and it always fetches the collection from the beginning.

	paginator := client.NewListServicesPaginator(
		&fastly.ListServicesInput{
			PerPage: 2,
			Page:    5,
		},
	)

This PR attempts to fix this by setting p.CurrentPage = i.Page only in the initial iteration.
cc: @Integralist

@Integralist Integralist merged commit 6ff3397 into fastly:main Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants