more consistent naming
diff --git a/openstack/identity/v3/endpoints/results.go b/openstack/identity/v3/endpoints/results.go
index 09e58e5..2788f16 100644
--- a/openstack/identity/v3/endpoints/results.go
+++ b/openstack/identity/v3/endpoints/results.go
@@ -55,17 +55,16 @@
}
// IsEmpty returns true if no Endpoints were returned.
-func (p EndpointPage) IsEmpty() (bool, error) {
- es, err := ExtractEndpoints(p)
+func (r EndpointPage) IsEmpty() (bool, error) {
+ es, err := ExtractEndpoints(r)
return len(es) == 0, err
}
// ExtractEndpoints extracts an Endpoint slice from a Page.
-func ExtractEndpoints(page pagination.Page) ([]Endpoint, error) {
- r := page.(EndpointPage)
+func ExtractEndpoints(r pagination.Page) ([]Endpoint, error) {
var s struct {
Endpoints []Endpoint `json:"endpoints"`
}
- err := r.ExtractInto(&s)
+ err := (r.(EndpointPage)).ExtractInto(&s)
return s.Endpoints, err
}