Rename ListResult(s) to ListPage.
diff --git a/openstack/compute/v2/images/images.go b/openstack/compute/v2/images/images.go
index c4e838e..0dee058 100644
--- a/openstack/compute/v2/images/images.go
+++ b/openstack/compute/v2/images/images.go
@@ -30,7 +30,7 @@
// ExtractImages converts a page of List results into a slice of usable Image structs.
func ExtractImages(page pagination.Page) ([]Image, error) {
- casted := page.(ListResults).Body
+ casted := page.(ListPage).Body
var results []Image
err := mapstructure.Decode(results, casted)
diff --git a/openstack/compute/v2/images/requests.go b/openstack/compute/v2/images/requests.go
index 22c6e9b..832979c 100644
--- a/openstack/compute/v2/images/requests.go
+++ b/openstack/compute/v2/images/requests.go
@@ -5,14 +5,14 @@
"github.com/rackspace/gophercloud/pagination"
)
-// ListResults contains a single page of results from a List operation.
+// ListPage contains a single page of results from a List operation.
// Use ExtractImages to convert it into a slice of usable structs.
-type ListResults struct {
+type ListPage struct {
pagination.MarkerPageBase
}
// IsEmpty returns true if a page contains no Image results.
-func (page ListResults) IsEmpty() (bool, error) {
+func (page ListPage) IsEmpty() (bool, error) {
images, err := ExtractImages(page)
if err != nil {
return true, err
@@ -20,8 +20,8 @@
return len(images) == 0, nil
}
-// LastMarker returns the ID of the final Image on the current page of ListResults.
-func (page ListResults) LastMarker() (string, error) {
+// LastMarker returns the ID of the final Image on the current page of ListPage.
+func (page ListPage) LastMarker() (string, error) {
images, err := ExtractImages(page)
if err != nil {
return "", err
@@ -35,7 +35,7 @@
// List enumerates the available images.
func List(client *gophercloud.ServiceClient) pagination.Pager {
createPage := func(r pagination.LastHTTPResponse) pagination.Page {
- p := ListResults{pagination.MarkerPageBase{LastHTTPResponse: r}}
+ p := ListPage{pagination.MarkerPageBase{LastHTTPResponse: r}}
p.MarkerPageBase.Owner = p
return p
}