more consistent naming
diff --git a/openstack/cdn/v1/services/results.go b/openstack/cdn/v1/services/results.go
index e37fafa..6de3497 100644
--- a/openstack/cdn/v1/services/results.go
+++ b/openstack/cdn/v1/services/results.go
@@ -230,10 +230,7 @@
// IsEmpty returns true if a ListResult contains no services.
func (r ServicePage) IsEmpty() (bool, error) {
services, err := ExtractServices(r)
- if err != nil {
- return true, err
- }
- return len(services) == 0, nil
+ return len(services) == 0, err
}
// LastMarker returns the last service in a ListResult.
@@ -249,12 +246,11 @@
}
// ExtractServices is a function that takes a ListResult and returns the services' information.
-func ExtractServices(page pagination.Page) ([]Service, error) {
- r := page.(ServicePage)
+func ExtractServices(r pagination.Page) ([]Service, error) {
var s struct {
Services []Service `json:"services"`
}
- err := r.ExtractInto(&s)
+ err := (r.(ServicePage)).ExtractInto(&s)
return s.Services, err
}