refactored DecodeHeader function to gophercloud package; updated tests
diff --git a/openstack/objectstorage/v1/objects/results.go b/openstack/objectstorage/v1/objects/results.go
index b9b4084..e29e3a8 100644
--- a/openstack/objectstorage/v1/objects/results.go
+++ b/openstack/objectstorage/v1/objects/results.go
@@ -139,7 +139,7 @@
return dh, dr.Err
}
- if err := mapstructure.Decode(dr.Header, &dh); err != nil {
+ if err := gophercloud.DecodeHeader(dr.Header, &dh); err != nil {
return dh, err
}
@@ -207,7 +207,7 @@
return gh, gr.Err
}
- if err := mapstructure.Decode(gr.Header, &gh); err != nil {
+ if err := gophercloud.DecodeHeader(gr.Header, &gh); err != nil {
return gh, err
}
@@ -269,7 +269,7 @@
return ch, cr.Err
}
- if err := mapstructure.Decode(cr.Header, &ch); err != nil {
+ if err := gophercloud.DecodeHeader(cr.Header, &ch); err != nil {
return ch, err
}
@@ -313,7 +313,7 @@
return uh, ur.Err
}
- if err := mapstructure.Decode(ur.Header, &uh); err != nil {
+ if err := gophercloud.DecodeHeader(ur.Header, &uh); err != nil {
return uh, err
}
@@ -349,7 +349,7 @@
return dh, dr.Err
}
- if err := mapstructure.Decode(dr.Header, &dh); err != nil {
+ if err := gophercloud.DecodeHeader(dr.Header, &dh); err != nil {
return dh, err
}
@@ -389,7 +389,7 @@
return ch, cr.Err
}
- if err := mapstructure.Decode(cr.Header, &ch); err != nil {
+ if err := gophercloud.DecodeHeader(cr.Header, &ch); err != nil {
return ch, err
}