Use a method to change the CreatePage function.
diff --git a/openstack/identity/v2/extensions/delegate.go b/openstack/identity/v2/extensions/delegate.go
index b3f921a..77bf7fb 100644
--- a/openstack/identity/v2/extensions/delegate.go
+++ b/openstack/identity/v2/extensions/delegate.go
@@ -79,11 +79,9 @@
// List returns a Pager which allows you to iterate over the full collection of extensions.
// It does not accept query parameters.
func List(c *gophercloud.ServiceClient) pagination.Pager {
- pager := common.List(c)
- pager.CreatePage = func(r pagination.LastHTTPResponse) pagination.Page {
+ return common.List(c).WithPageCreator(func(r pagination.LastHTTPResponse) pagination.Page {
return ExtensionPage{
ExtensionPage: common.ExtensionPage{SinglePageBase: pagination.SinglePageBase(r)},
}
- }
- return pager
+ })
}