remove mapstructure from blockstorage,cdn,compute,db pkgs
diff --git a/openstack/cdn/v1/base/results.go b/openstack/cdn/v1/base/results.go
index 4e1b524..2dfde7d 100644
--- a/openstack/cdn/v1/base/results.go
+++ b/openstack/cdn/v1/base/results.go
@@ -1,10 +1,6 @@
package base
-import (
- "errors"
-
- "github.com/gophercloud/gophercloud"
-)
+import "github.com/gophercloud/gophercloud"
// HomeDocument is a resource that contains all the resources for the CDN API.
type HomeDocument map[string]interface{}
@@ -16,17 +12,9 @@
// Extract is a function that accepts a result and extracts a home document resource.
func (r GetResult) Extract() (*HomeDocument, error) {
- if r.Err != nil {
- return nil, r.Err
- }
-
- submap, ok := r.Body.(map[string]interface{})["resources"]
- if !ok {
- return nil, errors.New("Unexpected HomeDocument structure")
- }
- casted := HomeDocument(submap.(map[string]interface{}))
-
- return &casted, nil
+ var s HomeDocument
+ err := r.ExtractInto(&s)
+ return &s, err
}
// PingResult represents the result of a Ping operation.