Skip to content

fix(byoip): honor ListOptions in BYOIPPrefixes.GetResources - #1215

Open
pcbeingused333 wants to merge 2 commits into
digitalocean:mainfrom
pcbeingused333:fix/byoip-getresources-pagination
Open

pcbeingused333 wants to merge 2 commits into
digitalocean:mainfrom
pcbeingused333:fix/byoip-getresources-pagination

Conversation

@pcbeingused333

Copy link
Copy Markdown

Fixes the BYOIPPrefixes.GetResources pagination bug: ListOptions was ignored (found by code review, no issue filed).

Cause: GetResources called addOptions(path, opt) and discarded both the returned URL and the error, so Page and PerPage were never sent. Asking for page 2 returned page 1. The sibling List in the same file assigns path, err := addOptions(path, opt) correctly.

Fix: use the returned path and return the error, same as List.

Tests: TestBYOIPPrefixes_GetResourcesListOptions in byoip_prefixes_test.go asserts page=2&per_page=50 reach the request. Red before the fix, green after; go test . and go vet . pass.

Disclosure: this change was prepared with an AI coding assistant (Claude) and submitted by the account owner.

pcbeingused333 and others added 2 commits November 10, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant