more consistent naming
diff --git a/openstack/compute/v2/extensions/keypairs/results.go b/openstack/compute/v2/extensions/keypairs/results.go
index 2b40943..f4d8d35 100644
--- a/openstack/compute/v2/extensions/keypairs/results.go
+++ b/openstack/compute/v2/extensions/keypairs/results.go
@@ -39,15 +39,14 @@
}
// ExtractKeyPairs interprets a page of results as a slice of KeyPairs.
-func ExtractKeyPairs(page pagination.Page) ([]KeyPair, error) {
- r := page.(KeyPairPage)
+func ExtractKeyPairs(r pagination.Page) ([]KeyPair, error) {
type pair struct {
KeyPair KeyPair `json:"keypair"`
}
var s struct {
KeyPairs []pair `json:"keypairs"`
}
- err := r.ExtractInto(&s)
+ err := (r.(KeyPairPage)).ExtractInto(&s)
results := make([]KeyPair, len(s.KeyPairs))
for i, pair := range s.KeyPairs {
results[i] = pair.KeyPair