The iam package is very foundational, and now depends on the pagination package. Thus, the pagination package must not import any packages that may import iam, such as the plugin package. Move the plugin helpers to a subdirectory to avoid this import cycle.
Boundary list pagination logic
This package encapsulates the logic used to attempt to fill every page in a request to a Boundary list endpoint. For example use, see example_test.go.