use strings.HasSuffix to check for links key
diff --git a/pagination/pager.go b/pagination/pager.go
index 68fe140..817b806 100644
--- a/pagination/pager.go
+++ b/pagination/pager.go
@@ -5,6 +5,7 @@
"fmt"
"net/http"
"reflect"
+ "strings"
"github.com/rackspace/gophercloud"
)
@@ -154,7 +155,7 @@
b := page.GetBody().(map[string]interface{})
for k := range b {
// If it's a linked page, we don't want the `links`, we want the other one.
- if k != "links" {
+ if !strings.HasSuffix(k, "links") {
key = k
}
}