more consistent naming
diff --git a/openstack/identity/v2/tenants/results.go b/openstack/identity/v2/tenants/results.go
index bf52554..3ce1e67 100644
--- a/openstack/identity/v2/tenants/results.go
+++ b/openstack/identity/v2/tenants/results.go
@@ -26,17 +26,17 @@
}
// IsEmpty determines whether or not a page of Tenants contains any results.
-func (page TenantPage) IsEmpty() (bool, error) {
- tenants, err := ExtractTenants(page)
+func (r TenantPage) IsEmpty() (bool, error) {
+ tenants, err := ExtractTenants(r)
return len(tenants) == 0, err
}
// NextPageURL extracts the "next" link from the tenants_links section of the result.
-func (page TenantPage) NextPageURL() (string, error) {
+func (r TenantPage) NextPageURL() (string, error) {
var s struct {
Links []gophercloud.Link `json:"tenants_links"`
}
- err := page.ExtractInto(&s)
+ err := r.ExtractInto(&s)
if err != nil {
return "", err
}
@@ -44,11 +44,10 @@
}
// ExtractTenants returns a slice of Tenants contained in a single page of results.
-func ExtractTenants(page pagination.Page) ([]Tenant, error) {
- r := page.(TenantPage)
+func ExtractTenants(r pagination.Page) ([]Tenant, error) {
var s struct {
Tenants []Tenant `json:"tenants"`
}
- err := r.ExtractInto(&s)
+ err := (r.(TenantPage)).ExtractInto(&s)
return s.Tenants, err
}